Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Reference Section

Header <boost/pfr.hpp>
Header <boost/pfr/config.hpp>
Header <boost/pfr/core.hpp>
Header <boost/pfr/functions_for.hpp>
Header <boost/pfr/functors.hpp>
Header <boost/pfr/io.hpp>
Header <boost/pfr/io_fields.hpp>
Header <boost/pfr/ops.hpp>
Header <boost/pfr/ops_fields.hpp>
Header <boost/pfr/traits.hpp>
Header <boost/pfr/traits_fwd.hpp>
Header <boost/pfr/tuple_size.hpp>

Header <boost/pfr.hpp>

Includes all the Boost.PFR headers

Contains all the macros that describe Boost.PFR configuration, like BOOST_PFR_ENABLED

[Note] Note

This header file doesn't require C++14 Standard and supports all C++ compilers, even pre C++14 compilers (C++11, C++03...).


BOOST_PFR_NOT_SUPPORTED
BOOST_PFR_USE_LOOPHOLE
BOOST_PFR_USE_CPP17
BOOST_PFR_USE_STD_MAKE_INTEGRAL_SEQUENCE
BOOST_PFR_HAS_GUARANTEED_COPY_ELISION
BOOST_PFR_ENABLE_IMPLICIT_REFLECTION
BOOST_PFR_MAYBE_UNUSED
BOOST_PFR_ENABLED

Contains all the basic tuple-like interfaces boost::pfr::get , boost::pfr::tuple_size , boost::pfr::tuple_element_t , and others.

Synopsis:


  
    typedef  ;
    typedef  ;
    template< I, typename T> 
       ();
    template< I, typename T> 
       
      ( val,  = );
    template< I, typename T> 
       
      (,  = );
    template< I, typename T> 
       
      ( val, 
           = );
    template<typename U, typename T>  ( val);
    template<typename U, typename T> 
       
      ( val,  = );
    template<typename U, typename T> 
       
      (,  = );
    template<typename U, typename T> 
       
      ( val, 
           = );
    template<typename T>  ();
    template<typename T>  ();
    template<typename T> 
       
      ( val, 
                     = );
    template<typename T> 
       
      (, 
                     = );
    template<typename T> 
       
      (, 
                     = );
    template<typename T, typename F>  (, );
    template< Elements> 
       ();
  }
}

Contains BOOST_PFR_FUNCTIONS_FOR macro that defined comparison and stream operators for T along with hash_value function. Example:

See Also : 'Three ways of getting operators' for other ways to define operators and more details.

Synopsis:


BOOST_PFR_FUNCTIONS_FOR(T)

Contains functors that are close to the Standard Library ones. Each functor calls corresponding Boost.PFR function from boost/pfr/ops.hpp

Example:

boost::pfr::hash<>,
    boost::pfr::equal_to<>
> 

Synopsis:


  
    template<typename T> struct equal_to;
    template<typename T> struct greater;
    template<typename T> struct greater_equal;
    template<typename T> struct hash;
    template<typename T> struct less;
    template<typename T> struct less_equal;
    template<typename T> struct not_equal;
  }
}

Contains IO stream manipulator boost::pfr::io for types. If type is streamable using its own operator or its conversion operator, then the types operator is used.

Example:

See Also : 'Three ways of getting operators' for other ways to define operators and more details.

Synopsis:


  
    template<typename T>  ();
  }
}

Contains IO manipulator boost::pfr::io_fields to read/write any simple aggregate field-by-field.

Example:

See Also : 'Three ways of getting operators' for other ways to define operators and more details.

Synopsis:


  
    template<typename T>  ();
  }
}

Contains comparison and hashing functions. If type is comparable using its own operator or its conversion operator, then the types operator is used. Otherwise the operation is done via corresponding function from boost/pfr/ops.hpp header.

Example:

See Also : 'Three ways of getting operators' for other ways to define operators and more details.

Synopsis:


  
    template<typename T, typename U>  (, );
    template<typename T, typename U> 
       ( lhs,  rhs);
    template<typename T, typename U>  (, );
    template<typename T, typename U> 
       ( lhs,  rhs);
    template<typename T, typename U>  (, );
    template<typename T, typename U> 
       ( lhs,  rhs);
    template<typename T, typename U>  (, );
    template<typename T, typename U> 
       ( lhs,  rhs);
    template<typename T, typename U>  (, );
    template<typename T, typename U> 
       ( lhs,  rhs);
    template<typename T, typename U>  (, );
    template<typename T, typename U> 
       ( lhs,  rhs);
    template<typename T>  ();
    template<typename T>  ( value);
  }
}

Contains field-by-fields comparison and hash functions.

Example:

See Also : 'Three ways of getting operators' for other ways to define operators and more details.

Synopsis:


  
    template<typename T, typename U> 
       (, );
    template<typename T, typename U> 
       (, );
    template<typename T, typename U> 
       (, );
    template<typename T, typename U> 
       (, );
    template<typename T, typename U> 
       (, );
    template<typename T, typename U> 
       (, );
    template<typename T>  ();
  }
}

Contains traits boost::pfr::is_reflectable and boost::pfr::is_implicitly_reflectable for detecting an ability to reflect type.

Synopsis:


  
    template<typename T, typename WhatFor> struct is_reflectable;

    template<typename T, typename WhatFor> struct is_reflectable<, >;
    template<typename T, typename WhatFor> struct is_reflectable<, >;
    template<typename T, typename WhatFor> struct is_reflectable<, >;
    typedef  ;

     is_implicitly_reflectable_v;
  }
}

Contains tuple-like interfaces to get fields count boost::pfr::tuple_size , boost::pfr::tuple_size_v .

Synopsis:


  
    typedef  ;

     tuple_size_v;
  }
}

PrevUpHomeNext