Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::geometry::add_const_if_c< IsConst, Type > Struct Template Reference

Meta-function to define a const or non const type. More...

#include <add_const_if_c.hpp>

Public Types

typedef boost::mpl::if_c
< IsConst, Type const, Type >
::type 
type
 

Detailed Description

template<bool IsConst, typename Type>
struct boost::geometry::add_const_if_c< IsConst, Type >

Meta-function to define a const or non const type.

If the boolean template parameter is true, the type parameter will be defined as const, otherwise it will be defined as it was. This meta-function is used to have one implementation for both const and non const references

Note
This traits class is completely independant from Boost.Geometry and might be a separate addition to Boost
Used in a.o. for_each, interior_rings, exterior_ring
Example
void foo(typename add_const_if_c<IsConst, Point>::type& point)

Member Typedef Documentation

template<bool IsConst, typename Type >
typedef boost::mpl::if_c< IsConst, Type const, Type >::type boost::geometry::add_const_if_c< IsConst, Type >::type

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