標準庫標頭檔案 <source_location> (C++20)
來自 cppreference.com
此標頭檔案是 utility 庫的一部分。
類 | |
(C++20) |
一個表示原始碼資訊的類,例如檔名、行號和函式名 (類) |
[編輯] 概要
namespace std { struct source_location; }
[編輯] 類 std::source_location
namespace std { struct source_location { // source location construction static consteval source_location current() noexcept; constexpr source_location() noexcept; // source location field access 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_; // exposition only uint_least32_t column_; // exposition only const char* file_name_; // exposition only const char* function_name_; // exposition only }; }