std::experimental::reflect::get_source_line

Header: <experimental/reflect>

Provides the member constant value equal to the presumed line number of the declaration of the entity or typedef-name reflected by T.

# Declarations

template< Object T >
struct get_source_line;

(reflection TS)

# Example

#include<experimental/reflect>
#include<iostream>
 
using refl = std::experimental::reflect;
 
float f;
struct P{};
 
int main()
{
    std::cout << refl::get_source_line_v<reflexpr(f)> << '\n';
    std::cout << refl::get_source_line_v<reflexpr(P)> << '\n';
}

# See also