Index: boost/property_map/property_map.hpp =================================================================== --- boost/property_map/property_map.hpp (revision 60077) +++ boost/property_map/property_map.hpp (working copy) @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include namespace boost { @@ -26,13 +28,47 @@ //========================================================================= // property_traits class + BOOST_MPL_HAS_XXX_TRAIT_DEF(key_type); + BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type); + BOOST_MPL_HAS_XXX_TRAIT_DEF(reference); + BOOST_MPL_HAS_XXX_TRAIT_DEF(category); + + template + struct is_property_map : + boost::mpl::and_< + has_key_type, + has_value_type, + has_reference, + has_category + > + {}; + template + struct default_property_traits { + typedef typename PA::key_type key_type; + typedef typename PA::value_type value_type; + typedef typename PA::reference reference; + typedef typename PA::category category; + }; + + struct null_property_traits {}; + + template + struct property_traits : + boost::mpl::if_, + default_property_traits, + null_property_traits>::type + {}; + +#if 0 + template struct property_traits { typedef typename PA::key_type key_type; typedef typename PA::value_type value_type; typedef typename PA::reference reference; typedef typename PA::category category; }; +#endif //========================================================================= // property_traits category tags