boost::geometry::add_const_if_c< IsConst, Type > Struct Template Reference

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

List of all members.

## 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

April 2, 2011 | Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands Copyright © 2008-2011 Bruno Lalande, Paris, France Copyright © 2009-2010 Mateusz Loskot, London, UK