template_arity.hpp 833 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright Aleksey Gurtovoy 2001-2004
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header
  8. // -- DO NOT modify by hand!
  9. namespace boost { namespace mpl { namespace aux {
  10. template< bool >
  11. struct template_arity_impl
  12. {
  13. template< typename F > struct result_
  14. : mpl::int_< -1 >
  15. {
  16. };
  17. };
  18. template<>
  19. struct template_arity_impl<true>
  20. {
  21. template< typename F > struct result_
  22. : F::arity
  23. {
  24. };
  25. };
  26. template< typename F >
  27. struct template_arity
  28. : template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
  29. ::template result_<F>
  30. {
  31. };
  32. template<>
  33. struct template_arity<int>
  34. : mpl::int_< -1 >
  35. {
  36. };
  37. }}}