arity.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef BOOST_MPL_AUX_ARITY_HPP_INCLUDED
  2. #define BOOST_MPL_AUX_ARITY_HPP_INCLUDED
  3. // Copyright Aleksey Gurtovoy 2001-2004
  4. //
  5. // Distributed under the Boost Software License, Version 1.0.
  6. // (See accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //
  9. // See http://www.boost.org/libs/mpl for documentation.
  10. // $Id$
  11. // $Date$
  12. // $Revision$
  13. #include <boost/mpl/aux_/config/dtp.hpp>
  14. #if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
  15. # include <boost/mpl/aux_/nttp_decl.hpp>
  16. # include <boost/mpl/aux_/config/static_constant.hpp>
  17. namespace boost { namespace mpl { namespace aux {
  18. // agurt, 15/mar/02: it's possible to implement the template so that it will
  19. // "just work" and do not require any specialization, but not on the compilers
  20. // that require the arity workaround in the first place
  21. template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) >
  22. struct arity
  23. {
  24. BOOST_STATIC_CONSTANT(int, value = N);
  25. };
  26. }}}
  27. #endif // BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES
  28. #endif // BOOST_MPL_AUX_ARITY_HPP_INCLUDED