construct_pod_funop.hpp 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. ///////////////////////////////////////////////////////////////////////////////
  2. /// \file construct_pod_funop.hpp
  3. /// Overloads of construct_\<\>::operator().
  4. //
  5. // Copyright 2008 Eric Niebler. Distributed under the Boost
  6. // Software License, Version 1.0. (See accompanying file
  7. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. template<typename A0>
  9. BOOST_FORCEINLINE
  10. Type operator ()(A0 &a0) const
  11. {
  12. Type that = {a0};
  13. return that;
  14. }
  15. template<typename A0 , typename A1>
  16. BOOST_FORCEINLINE
  17. Type operator ()(A0 &a0 , A1 &a1) const
  18. {
  19. Type that = {a0 , a1};
  20. return that;
  21. }
  22. template<typename A0 , typename A1 , typename A2>
  23. BOOST_FORCEINLINE
  24. Type operator ()(A0 &a0 , A1 &a1 , A2 &a2) const
  25. {
  26. Type that = {a0 , a1 , a2};
  27. return that;
  28. }
  29. template<typename A0 , typename A1 , typename A2 , typename A3>
  30. BOOST_FORCEINLINE
  31. Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3) const
  32. {
  33. Type that = {a0 , a1 , a2 , a3};
  34. return that;
  35. }
  36. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
  37. BOOST_FORCEINLINE
  38. Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4) const
  39. {
  40. Type that = {a0 , a1 , a2 , a3 , a4};
  41. return that;
  42. }
  43. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
  44. BOOST_FORCEINLINE
  45. Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5) const
  46. {
  47. Type that = {a0 , a1 , a2 , a3 , a4 , a5};
  48. return that;
  49. }
  50. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
  51. BOOST_FORCEINLINE
  52. Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6) const
  53. {
  54. Type that = {a0 , a1 , a2 , a3 , a4 , a5 , a6};
  55. return that;
  56. }
  57. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
  58. BOOST_FORCEINLINE
  59. Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7) const
  60. {
  61. Type that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7};
  62. return that;
  63. }
  64. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
  65. BOOST_FORCEINLINE
  66. Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8) const
  67. {
  68. Type that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8};
  69. return that;
  70. }
  71. template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
  72. BOOST_FORCEINLINE
  73. Type operator ()(A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8 , A9 &a9) const
  74. {
  75. Type that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9};
  76. return that;
  77. }