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
This is an older version of Boost and was released in 2020. The current version is 1.89.0.
BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_TRAITS
// In header: <boost/stl_interfaces/iterator_interface.hpp>
BOOST_STL_INTERFACES_STATIC_ASSERT_ITERATOR_TRAITS(iter, category, concept, value_type, reference, pointer, difference_type)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_tag, int, int &, int *, std::ptrdiff_t).
![]() |
Note |
|---|---|
This macro ignores the |