Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
concepts.hpp File Reference

Concept checks for the Boost Range library. More...

#include <boost/concept_check.hpp>
#include <boost/iterator/iterator_concepts.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/iterator.hpp>
#include <boost/range/value_type.hpp>
#include <boost/range/detail/misc_concept.hpp>
#include <boost/type_traits/remove_reference.hpp>
Include dependency graph for concepts.hpp:

Classes

struct  boost::range_detail::IncrementableIteratorConcept< Iterator >
 
struct  boost::range_detail::SinglePassIteratorConcept< Iterator >
 
struct  boost::range_detail::ForwardIteratorConcept< Iterator >
 
struct  boost::range_detail::BidirectionalIteratorConcept< Iterator >
 
struct  boost::range_detail::RandomAccessIteratorConcept< Iterator >
 
struct  boost::SinglePassRangeConcept< T >
 Check if a type T models the SinglePassRange range concept. More...
 
struct  boost::ForwardRangeConcept< T >
 Check if a type T models the ForwardRange range concept. More...
 
struct  boost::WriteableRangeConcept< T >
 
struct  boost::WriteableForwardRangeConcept< T >
 Check if a type T models the WriteableForwardRange range concept. More...
 
struct  boost::BidirectionalRangeConcept< T >
 Check if a type T models the BidirectionalRange range concept. More...
 
struct  boost::WriteableBidirectionalRangeConcept< T >
 Check if a type T models the WriteableBidirectionalRange range concept. More...
 
struct  boost::RandomAccessRangeConcept< T >
 Check if a type T models the RandomAccessRange range concept. More...
 
struct  boost::WriteableRandomAccessRangeConcept< T >
 Check if a type T models the WriteableRandomAccessRange range concept. More...
 

Namespaces

 boost
 Duration formatting facet for input.
 
 boost::range_detail
 

Macros

#define BOOST_RANGE_ENABLE_CONCEPT_ASSERT   1
 
#define BOOST_RANGE_CONCEPT_ASSERT(x)   BOOST_CONCEPT_ASSERT( x )
 

Detailed Description

Concept checks for the Boost Range library.

The structures in this file may be used in conjunction with the Boost Concept Check library to insure that the type of a function parameter is compatible with a range concept. If not, a meaningful compile time error is generated. Checks are provided for the range concepts related to iterator traversal categories. For example, the following line checks that the type T models the ForwardRange concept.

BOOST_CONCEPT_ASSERT((ForwardRangeConcept<T>));

A different concept check is required to ensure writeable value access. For example to check for a ForwardRange that can be written to, the following code is required.

BOOST_CONCEPT_ASSERT((WriteableForwardRangeConcept<T>));
See also
http://www.boost.org/libs/range/doc/range.html for details about range concepts.
http://www.boost.org/libs/iterator/doc/iterator_concepts.html for details about iterator concepts.
http://www.boost.org/libs/concept_check/concept_check.htm for details about concept checks.

Macro Definition Documentation

#define BOOST_RANGE_CONCEPT_ASSERT (   x)    BOOST_CONCEPT_ASSERT( x )

Referenced by boost::accumulate(), boost::adjacent_difference(), boost::adaptors::adjacent_filter(), boost::range::adjacent_find(), boost::geometry::range::at(), boost::geometry::range::back(), boost::range::binary_search(), boost::range::copy(), boost::adaptors::copy(), boost::range::copy_backward(), boost::range::copy_n(), boost::range::count(), boost::range::count_if(), boost::range::equal(), boost::range::equal_range(), boost::range::erase(), boost::range::fill(), boost::range::fill_n(), boost::adaptors::filter(), boost::range::find(), boost::range::find_end(), boost::range::find_first_of(), boost::range::find_if(), boost::range::for_each(), boost::range::generate(), boost::range::includes(), boost::adaptors::index(), boost::adaptors::indirect(), boost::inner_product(), boost::range::inplace_merge(), boost::range::insert(), boost::range::is_sorted(), boost::range::join(), boost::adaptors::keys(), boost::range::lexicographical_compare(), boost::range::lower_bound(), boost::range::make_heap(), boost::range::max_element(), boost::range::merge(), boost::range::min_element(), boost::range::mismatch(), boost::range::next_permutation(), boost::range::nth_element(), boost::adaptors::operator|(), boost::range_detail::operator|(), boost::range::overwrite(), boost::range::partial_sort(), boost::range::partial_sort_copy(), boost::partial_sum(), boost::range::partition(), boost::range::pop_heap(), boost::range::prev_permutation(), boost::range::push_back(), boost::range::push_front(), boost::range::push_heap(), boost::range::random_shuffle(), boost::range::remove(), boost::range::remove_copy(), boost::remove_copy_if(), boost::range::remove_erase(), boost::range::remove_erase_if(), boost::range::remove_if(), boost::range::replace(), boost::adaptors::replace(), boost::range::replace_copy(), boost::range::replace_copy_if(), boost::range::replace_if(), boost::adaptors::replace_if(), boost::range::reverse(), boost::adaptors::reverse(), boost::range::reverse_copy(), boost::range::rotate(), boost::range::rotate_copy(), boost::range::search(), boost::range::search_n(), boost::range_detail::search_n_impl(), boost::range_detail::search_n_pred_impl(), boost::range::set_difference(), boost::range::set_intersection(), boost::range::set_symmetric_difference(), boost::range::set_union(), boost::adaptors::slice(), boost::range::sort(), boost::range::sort_heap(), boost::range::stable_partition(), boost::range::stable_sort(), boost::range::swap_ranges(), boost::range::transform(), boost::adaptors::transform(), boost::adaptors::type_erase(), boost::range::unique(), boost::adaptors::unique(), boost::range::unique_copy(), boost::range::upper_bound(), and boost::adaptors::values().

#define BOOST_RANGE_ENABLE_CONCEPT_ASSERT   1