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