Files
fusion/test/support/pair_nest.cpp

30 lines
781 B
C++
Raw Permalink Normal View History

/*=============================================================================
2018-03-23 02:25:38 +09:00
Copyright (c) 2015,2018 Kohei Takahashi
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#include <boost/core/ignore_unused.hpp>
#include <boost/fusion/support/pair.hpp>
using namespace boost::fusion;
template <typename C>
2018-03-23 02:25:38 +09:00
void copy(C value)
{
2018-03-23 02:25:38 +09:00
pair<int, C> src(value);
pair<int, C> dest = src;
boost::ignore_unused(dest);
}
int main()
{
2018-03-23 02:25:38 +09:00
copy<pair<void, float> >(42.195f);
copy<pair<int, float> >(42.195f);
float f;
pair<void, float&> r(f);
copy<pair<void, float&> >(r);
}