]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mpl/test/aux_/template_arity.cpp
2 // Copyright Aleksey Gurtovoy 2000-2004
4 // Distributed under the Boost Software License, Version 1.0.
5 // (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
8 // See http://www.boost.org/libs/mpl for documentation.
14 #include <boost/mpl/aux_/template_arity.hpp>
15 #include <boost/mpl/aux_/test.hpp>
17 #if defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
20 template< typename T1
> struct my1
{};
21 template< typename T1
, typename T2
= void > struct my2
{};
25 MPL_ASSERT_RELATION( (aux::template_arity
<my
>::value
), ==, -1 );
26 MPL_ASSERT_RELATION( (aux::template_arity
< my1
<int> >::value
), ==, 1 );
27 MPL_ASSERT_RELATION( (aux::template_arity
< my2
<int,long> >::value
), ==, 2 );
28 MPL_ASSERT_RELATION( (aux::template_arity
< my2
<int> >::value
), ==, 2 );