// (C) Copyright Jeremy Siek 2001. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include // This file checks the property map concepts against the property map // archetypes to make sure they are consistent and that they compile. // This also checks all the property map classes defined in // property_map.hpp against the concept checking classes. int main() { using namespace boost; { typedef null_archetype<> Key; typedef assignable_archetype > Value; typedef readable_property_map_archetype PMap; BOOST_CONCEPT_ASSERT((ReadablePropertyMapConcept)); } { typedef null_archetype<> Key; typedef assignable_archetype > Value; typedef writable_property_map_archetype PMap; BOOST_CONCEPT_ASSERT((WritablePropertyMapConcept)); } { typedef null_archetype<> Key; typedef assignable_archetype > Value; typedef read_write_property_map_archetype PMap; BOOST_CONCEPT_ASSERT((ReadWritePropertyMapConcept)); } { typedef null_archetype<> Key; typedef assignable_archetype > Value; typedef lvalue_property_map_archetype PMap; BOOST_CONCEPT_ASSERT((LvaluePropertyMapConcept)); } { typedef null_archetype<> Key; typedef assignable_archetype > Value; typedef mutable_lvalue_property_map_archetype PMap; BOOST_CONCEPT_ASSERT((Mutable_LvaluePropertyMapConcept)); } { typedef std::ptrdiff_t Key; typedef int* PMap; BOOST_CONCEPT_ASSERT((Mutable_LvaluePropertyMapConcept)); } { typedef std::ptrdiff_t Key; typedef const int* PMap; BOOST_CONCEPT_ASSERT((LvaluePropertyMapConcept)); } { typedef sgi_assignable_archetype<> Key; // ? typedef sgi_assignable_archetype<> Value; typedef random_access_iterator_archetype Iterator; typedef readable_property_map_archetype IndexMap; typedef iterator_property_map PMap; BOOST_CONCEPT_ASSERT((LvaluePropertyMapConcept)); } { typedef sgi_assignable_archetype<> Key; typedef sgi_assignable_archetype<> Value; typedef mutable_random_access_iterator_archetype Iterator; typedef readable_property_map_archetype IndexMap; typedef iterator_property_map PMap; BOOST_CONCEPT_ASSERT((Mutable_LvaluePropertyMapConcept)); } { typedef sgi_assignable_archetype< less_than_comparable_archetype<> > Key; typedef default_constructible_archetype< sgi_assignable_archetype<> > Value; typedef std::map Container; typedef associative_property_map PMap; BOOST_CONCEPT_ASSERT((Mutable_LvaluePropertyMapConcept)); } { typedef sgi_assignable_archetype< less_than_comparable_archetype<> > Key; typedef default_constructible_archetype< sgi_assignable_archetype<> > Value; typedef std::map Container; typedef const_associative_property_map PMap; BOOST_CONCEPT_ASSERT((LvaluePropertyMapConcept)); } { typedef identity_property_map PMap; BOOST_CONCEPT_ASSERT((ReadablePropertyMapConcept)); } { typedef dummy_property_map PMap; BOOST_CONCEPT_ASSERT((ReadWritePropertyMapConcept)); } { typedef sgi_assignable_archetype<> Key; // ? typedef sgi_assignable_archetype<> Value; typedef readable_property_map_archetype IndexMap; typedef shared_array_property_map PMap; BOOST_CONCEPT_ASSERT((Mutable_LvaluePropertyMapConcept)); } return 0; }