CGAL 6.0 - CGAL and Boost Property Maps
Loading...
Searching...
No Matches
CGAL::Random_access_property_map< Container > Class Template Reference

#include <CGAL/property_map.h>

Definition

template<typename Container>
class CGAL::Random_access_property_map< Container >

A property map with std::size_t as key-type that can be used to access the i-th element in a container with random access.

Is model of
LvaluePropertyMap constness being than of Container.

Public Types

using Iterator = std::conditional_t< std::is_const< Container >::value, typename Container::const_iterator, typename Container::iterator >
 
typedef std::size_t key_type
 
typedef std::iterator_traits< Iterator >::value_type value_type
 
typedef std::iterator_traits< Iterator >::reference reference
 
typedef boost::lvalue_property_map_tag category
 

Public Member Functions

 Random_access_property_map (Container &container)
 
decltype(auto) operator[] (key_type index) const
 

Friends

reference get (Random_access_property_map map, key_type index)
 
template<class Key >
void put (Random_access_property_map map, Key index, const value_type &value, std::enable_if_t<!std::is_const< Container >::value > *=0)
 

Related Functions

(Note that these are not member functions.)

template<class Container >
Random_access_property_map< Containermake_random_access_property_map (Container &container)
 returns Random_access_property_map<Container>(container)