Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Macro BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_TRAITS

BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_TRAITS

Synopsis

// In header: <boost/stl_interfaces/iterator_interface.hpp>

BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_TRAITS(iter, category, concept, value_type, reference, pointer, difference_type)

Description

static_asserts that the types of all typedefs in std::iterator_traits<iter> match the remaining macro parameters. This is useful for checking that an iterator you write using iterator_interface has the correct iterator traits.

For example: BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_TRAITS(my_iter, std::input_iterator_tag, std::input_iterator, int, int &, int *, std::ptrdiff_t).

[Note] Note

This macro ignores the concept parameter when __cpp_lib_concepts is not defined.


PrevUpHomeNext