标准库标头 <source_location> (C++20)
来自cppreference.com
此头文件是工具库的一部分。
类 | |
(C++20) | 表示关于源代码的信息(例如文件名、行号以及函数名)的类 (类) |
[编辑]概要
namespace std {struct source_location;}
[编辑]类 std::source_location
namespace std {struct source_location {// source_location 构造static consteval source_location current()noexcept;constexpr source_location()noexcept; // source_location 域访问constexpr uint_least32_t line()constnoexcept;constexpr uint_least32_t column()constnoexcept;constexprconstchar* file_name()constnoexcept;constexprconstchar* function_name()constnoexcept; private: uint_least32_t line_;// 仅为阐释 uint_least32_t column_;// 仅为阐释constchar* file_name_;// 仅为阐释constchar* function_name_;// 仅为阐释};}