Fix test/variant_move_construct_cx.cpp

This commit is contained in:
Peter Dimov
2018-10-24 19:03:00 +03:00
parent c1d2d991b4
commit 33f28c739f
2 changed files with 2 additions and 11 deletions

View File

@ -30,7 +30,7 @@ run variant_copy_construct.cpp ;
compile variant_copy_construct_cx.cpp : <toolset>msvc-14.0:<build>no ;
run variant_move_construct.cpp ;
compile variant_move_construct_cx.cpp ;
compile variant_move_construct_cx.cpp : [ requires cxx14_constexpr ] ;
run variant_value_construct.cpp ;
compile variant_value_construct_cx.cpp ;

View File

@ -6,13 +6,6 @@
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#if !defined( __cpp_constexpr ) || __cpp_constexpr < 201603
// no constexpr lambda support
int main() {}
#else
#include <boost/variant2/variant.hpp>
#include <utility>
@ -44,7 +37,7 @@ enum E
template<class T, class V> constexpr T test( V&& v )
{
V v2( std::forward<V>(v) );
return get<T>(v);
return get<T>( v2 );
}
int main()
@ -109,5 +102,3 @@ int main()
#endif
}
#endif // constexpr lambda support