Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
spatial::details::with_builtin_difference < Container, typename enable_if< is_compare_builtin< Container > >::type > Struct Template Reference

Retrieve the builtin difference functor on the condition that the compare functor used in Container is a builtin comparator. More...

#include <spatial_builtin.hpp>

Public Types

typedef builtin_difference< typename container_traits< Container >::key_compare >::type type
 

Public Member Functions

type operator() (const Container &container) const
 Constructs the difference type from the built-in container's key compare operator. More...
 

Detailed Description

template<typename Container>
struct spatial::details::with_builtin_difference < Container, typename enable_if< is_compare_builtin< Container > >::type >

Retrieve the builtin difference functor on the condition that the compare functor used in Container is a builtin comparator.

If you are not using one of the builtin compare functor for your Container, then you should also provide your user-defined difference function when using euclidian_neighbor_iterator<> or other similar iterators. For builtin comparator, this template helper will always return a difference operator with 'void' as a distance type. This void distance type is rebound in the neighbor_iterator into the correct distance type, provided that a builtin difference functor was used.

Template Parameters
ContainerThe container used in the iterator.
DistanceTypeThe type used to express distances.

Definition at line 88 of file spatial_builtin.hpp.

Member Typedef Documentation

template<typename Container >
typedef builtin_difference<typename container_traits<Container>::key_compare>::type spatial::details::with_builtin_difference < Container, typename enable_if< is_compare_builtin< Container > >::type >::type

Definition at line 140 of file spatial_builtin.hpp.

Member Function Documentation

template<typename Container >
type spatial::details::with_builtin_difference < Container, typename enable_if< is_compare_builtin< Container > >::type >::operator() ( const Container &  container) const

Constructs the difference type from the built-in container's key compare operator.

Definition at line 144 of file spatial_builtin.hpp.


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