2017-03-13 17:14:00 -07:00
|
|
|
#pragma once
|
|
|
|
|
2017-06-05 15:58:47 -07:00
|
|
|
#include <string>
|
|
|
|
|
2017-03-13 17:14:00 -07:00
|
|
|
namespace vcpkg
|
|
|
|
{
|
|
|
|
struct LineInfo
|
|
|
|
{
|
2019-04-08 23:26:18 -07:00
|
|
|
constexpr LineInfo() noexcept : m_line_number(0), m_file_name("") {}
|
|
|
|
constexpr LineInfo(const int lineno, const char* filename) : m_line_number(lineno), m_file_name(filename) {}
|
2017-03-13 17:14:00 -07:00
|
|
|
|
2017-04-03 16:47:58 -07:00
|
|
|
std::string to_string() const;
|
2019-04-08 23:26:18 -07:00
|
|
|
void to_string(std::string& out) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_line_number;
|
|
|
|
const char* m_file_name;
|
2017-03-13 17:14:00 -07:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#define VCPKG_LINE_INFO vcpkg::LineInfo(__LINE__, __FILE__)
|