at.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef BOOST_MPL_AT_HPP_INCLUDED
  2. #define BOOST_MPL_AT_HPP_INCLUDED
  3. // Copyright Aleksey Gurtovoy 2000-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/at_fwd.hpp>
  14. #include <boost/mpl/aux_/at_impl.hpp>
  15. #include <boost/mpl/long.hpp>
  16. #include <boost/mpl/sequence_tag.hpp>
  17. #include <boost/mpl/aux_/na_spec.hpp>
  18. #include <boost/mpl/aux_/lambda_support.hpp>
  19. #include <boost/mpl/aux_/nttp_decl.hpp>
  20. namespace boost { namespace mpl {
  21. template<
  22. typename BOOST_MPL_AUX_NA_PARAM(Sequence)
  23. , typename BOOST_MPL_AUX_NA_PARAM(N)
  24. >
  25. struct at
  26. : at_impl< typename sequence_tag<Sequence>::type >
  27. ::template apply< Sequence,N >
  28. {
  29. BOOST_MPL_AUX_LAMBDA_SUPPORT(2,at,(Sequence,N))
  30. };
  31. template<
  32. typename Sequence
  33. , BOOST_MPL_AUX_NTTP_DECL(long, N)
  34. >
  35. struct at_c
  36. : at_impl< typename sequence_tag<Sequence>::type >
  37. ::template apply< Sequence,mpl::long_<N> >
  38. {
  39. };
  40. BOOST_MPL_AUX_NA_SPEC(2, at)
  41. }}
  42. #endif // BOOST_MPL_AT_HPP_INCLUDED