std::experimental::reflect::get_source_line
來自 cppreference.com
< cpp | experimental | reflect
定義於標頭檔案 <experimental/reflect> |
||
template< Object T > struct get_source_line; |
(反射 TS) | |
提供成員常量 value
,等於由 T
反射的實體或 typedef 名稱宣告的推定行號。
目錄 |
[編輯] 輔助變數模板
template< class T > constexpr auto get_source_line_v = get_source_line<T>::value; |
(反射 TS) | |
繼承自 std::integral_constant
成員常量
value [靜態] |
由 T 反射的實體或 typedef 名稱宣告的推定行號(public static 成員常量) |
成員函式
operator std::uint_least32_t |
將物件轉換為 std::uint_least32_t,返回 value (公開成員函式) |
operator() (C++14) |
返回 value (公開成員函式) |
成員型別
型別 | 定義 |
value_type
|
std::uint_least32_t |
型別
|
std::integral_constant<std::uint_least32_t, value> |
[編輯] 示例
以下程式碼顯示了物件或類的原始碼行。
執行此程式碼
輸出
6 7
[編輯] 參閱
返回此物件表示的行號 ( std::source_location 的公共成員函式) | |
獲取與 stacktrace_entry 表示的求值在詞法上相關的行號( std::stacktrace_entry 的公共成員函式) |