File indexing completed on 2025-01-18 09:31:17
0001
0002
0003
0004
0005
0006
0007 #if !defined(FUSION_PUSH_BACK_07162005_0235)
0008 #define FUSION_PUSH_BACK_07162005_0235
0009
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/support/detail/as_fusion_element.hpp>
0012 #include <boost/fusion/view/joint_view/joint_view.hpp>
0013 #include <boost/fusion/view/single_view/single_view.hpp>
0014 #include <boost/fusion/support/is_sequence.hpp>
0015 #include <boost/utility/enable_if.hpp>
0016
0017 namespace boost { namespace fusion
0018 {
0019 namespace result_of
0020 {
0021 template <typename Sequence, typename T>
0022 struct push_back
0023 {
0024 typedef fusion::single_view<typename detail::as_fusion_element<T>::type> single_view;
0025 typedef joint_view<Sequence, single_view const> type;
0026 };
0027 }
0028
0029 template <typename Sequence, typename T>
0030 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0031 inline typename
0032 lazy_enable_if<
0033 traits::is_sequence<Sequence>
0034 , result_of::push_back<Sequence const, T>
0035 >::type
0036 push_back(Sequence const& seq, T const& x)
0037 {
0038 typedef typename result_of::push_back<Sequence const, T> push_back;
0039 typedef typename push_back::single_view single_view;
0040 typedef typename push_back::type result;
0041 single_view x_(x);
0042 return result(seq, x_);
0043 }
0044 }}
0045
0046 #endif
0047