tuple_tie.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*=============================================================================
  2. Copyright (c) 2014 Kohei Takahashi
  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. #ifndef FUSION_TUPLE_TIE_14122014_0115
  7. #define FUSION_TUPLE_TIE_14122014_0115
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/fusion/tuple/tuple_fwd.hpp>
  10. ///////////////////////////////////////////////////////////////////////////////
  11. // With no variadics, we will use the C++03 version
  12. ///////////////////////////////////////////////////////////////////////////////
  13. #if !defined(BOOST_FUSION_HAS_VARIADIC_TUPLE)
  14. # include <boost/fusion/tuple/detail/tuple_tie.hpp>
  15. #else
  16. ///////////////////////////////////////////////////////////////////////////////
  17. // C++11 interface
  18. ///////////////////////////////////////////////////////////////////////////////
  19. #include <boost/fusion/tuple/tuple.hpp>
  20. namespace boost { namespace fusion
  21. {
  22. template <typename ...T>
  23. BOOST_FUSION_GPU_ENABLED
  24. inline tuple<T&...>
  25. tie(T&... arg)
  26. {
  27. return tuple<T&...>(arg...);
  28. }
  29. }}
  30. #endif
  31. #endif