22 lines
503 B
C
Raw Normal View History

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
{
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
std::string to_string() const;
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__)