Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Reference Section

Header <boost/pfr.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/tuple_size.hpp>

Header <boost/pfr.hpp>

Includes all the Boost.PFR headers

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 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 manupulator boost::pfr::io_fields to read/write simple aggregate value 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 tuple-like interfaces to get fields count boost::pfr::tuple_size , boost::pfr::tuple_size_v .

Synopsis:


  
    typedef  ;

     tuple_size_v;
  }
}

PrevUpHomeNext