list.hpp 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. ==============================================================================*/
  6. #if !defined(FUSION_LIST_07172005_1153)
  7. #define FUSION_LIST_07172005_1153
  8. #include <boost/fusion/container/list/list_fwd.hpp>
  9. #include <boost/fusion/container/list/detail/list_to_cons.hpp>
  10. #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
  11. #include <boost/fusion/container/list/detail/preprocessed/list.hpp>
  12. #else
  13. #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
  14. #pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/list" FUSION_MAX_LIST_SIZE_STR ".hpp")
  15. #endif
  16. /*=============================================================================
  17. Copyright (c) 2001-2011 Joel de Guzman
  18. Distributed under the Boost Software License, Version 1.0. (See accompanying
  19. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  20. This is an auto-generated file. Do not edit!
  21. ==============================================================================*/
  22. #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
  23. #pragma wave option(preserve: 1)
  24. #endif
  25. namespace boost { namespace fusion
  26. {
  27. struct nil_;
  28. struct void_;
  29. template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)>
  30. struct list
  31. : detail::list_to_cons<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, T)>::type
  32. {
  33. private:
  34. typedef
  35. detail::list_to_cons<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, T)>
  36. list_to_cons;
  37. public:
  38. typedef typename list_to_cons::type inherited_type;
  39. list()
  40. : inherited_type() {}
  41. template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)>
  42. list(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs)
  43. : inherited_type(rhs) {}
  44. template <typename Sequence>
  45. list(Sequence const& rhs)
  46. : inherited_type(rhs) {}
  47. // Expand a couple of forwarding constructors for arguments
  48. // of type (T0), (T0, T1), (T0, T1, T2) etc. Exanple:
  49. //
  50. // list(
  51. // typename detail::call_param<T0>::type _0
  52. // , typename detail::call_param<T1>::type _1)
  53. // : inherited_type(list_to_cons::call(_0, _1)) {}
  54. #include <boost/fusion/container/list/detail/list_forward_ctor.hpp>
  55. template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename U)>
  56. list&
  57. operator=(list<BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, U)> const& rhs)
  58. {
  59. inherited_type::operator=(rhs);
  60. return *this;
  61. }
  62. template <typename T>
  63. list&
  64. operator=(T const& rhs)
  65. {
  66. inherited_type::operator=(rhs);
  67. return *this;
  68. }
  69. };
  70. }}
  71. #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
  72. #pragma wave option(output: null)
  73. #endif
  74. #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
  75. #endif