X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2Ftype_traits.hh;h=910b4e4c94771ec7ded41c6cc3562115554907f6;hb=1d41d158d2b9c45b5c900320aae4dea1c9091261;hp=f3e58114baf0cb7ee4896c9bbbc30a1b77a118bf;hpb=96a801acd64d520710b9c899ae23d462c759db38;p=senf.git diff --git a/senf/Utils/type_traits.hh b/senf/Utils/type_traits.hh index f3e5811..910b4e4 100644 --- a/senf/Utils/type_traits.hh +++ b/senf/Utils/type_traits.hh @@ -260,6 +260,28 @@ namespace senf typename senf::remove_any_pointer::type>::arity> {}; + /** Test object if it is any \c std::pair type + + if \a Pair is any \c std::pair type, this trait will inherit from \c boost::true_type, + otherwise it will inherit from \c boost::false_type. + + \code + BOOST_STATIC_ASSERT(( senf::is_pair< std::pair >::value )); + BOOST_STATIC_ASSERT(( ! senf::is_pair< void () >::value )); + \endcode + */ + template + struct is_pair + : public boost::false_type + {}; + +#ifndef DOXYGEN + template + struct is_pair< std::pair > + : public boost::true_type + {}; +#endif + ///} #ifndef DOXYGEN