aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include/LineInfo.h
blob: 62973462afce37824f9c6a5430b9bbb1d2249b8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include <string>

namespace vcpkg
{
    struct LineInfo
    {
        int line_number;
        const char* file_name;

        constexpr LineInfo() : line_number(0), file_name(nullptr) {}
        constexpr LineInfo(const int lineno, const char* filename) : line_number(lineno), file_name(filename) {}

        std::string to_string() const;
    };
}

#define VCPKG_LINE_INFO vcpkg::LineInfo(__LINE__, __FILE__)