siplasplas
A library for C++ reflection and introspection
cpp::static_reflection::meta::Field< SourceInfo, F, field > Class Template Reference

Stores static reflection information of a member object. More...

#include <siplasplas/reflection/static/field.hpp>

Public Types

using type = T Class::*
 Pointer to member type.
 
using value_type = T
 Type of the member value.
 
using class_type = Class
 Type of the class the member object belongs to.
 
using decay_t = cpp::meta::decay_t< value_type >
 Type of the member value without cv nor reference qualifiers.
 
using SourceInfo = SourceInfo_
 Source information of the member object. See cpp::static_reflection::meta::SourceInfo.
 

Static Public Member Functions

static constexpr type get ()
 Returns a pointer to the member object.
 
static constexpr const decay_tget (const Class &object)
 Returns the value of the field in a given object. More...
 
static constexpr decay_tget (Class &object)
 Returns the value of the field in a given object. More...
 

Detailed Description

template<typename SourceInfo, typename F, F field>
class cpp::static_reflection::meta::Field< SourceInfo, F, field >

Stores static reflection information of a member object.

Member Function Documentation

template<typename SourceInfo, typename F, F field>
static constexpr const decay_t& cpp::static_reflection::meta::Field< SourceInfo, F, field >::get ( const Class object)
inlinestatic

Returns the value of the field in a given object.

Equivalent to cpp::invoke(get(), object)

Parameters
objectObject to read the field value from
Returns
a const lvalue reference to the field
template<typename SourceInfo, typename F, F field>
static constexpr decay_t& cpp::static_reflection::meta::Field< SourceInfo, F, field >::get ( Class object)
inlinestatic

Returns the value of the field in a given object.

Equivalent to cpp::invoke(get(), object)

Parameters
objectObject to read the field value from
Returns
A non-const lvalue reference to the field

The documentation for this class was generated from the following file: