diff options
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg_Checks.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/toolsrc/include/vcpkg_Checks.h b/toolsrc/include/vcpkg_Checks.h index 23869f35f..c9293b0bb 100644 --- a/toolsrc/include/vcpkg_Checks.h +++ b/toolsrc/include/vcpkg_Checks.h @@ -2,6 +2,22 @@ #include "vcpkg_Strings.h" +namespace vcpkg +{ + struct LineInfo + { + int line_number; + const char* file_name; + + constexpr LineInfo() : line_number(0), file_name(nullptr) {} + constexpr LineInfo(const int line_number, const char* file_name) : line_number(line_number), file_name(file_name) {} + + std::string toString() const; + }; +} + +#define LINE_INFO vcpkg::LineInfo(__LINE__, __FILE__) + namespace vcpkg::Checks { __declspec(noreturn) void unreachable(); |
