Files
variant2/test/quick.cpp

14 lines
282 B
C++
Raw Permalink Normal View History

2019-06-03 17:50:13 +03:00
// Copyright 2019 Peter Dimov.
// Distributed under the Boost Software License, Version 1.0.
2021-09-11 17:19:09 +03:00
// https://www.boost.org/LICENSE_1_0.txt
2019-06-03 17:50:13 +03:00
2021-09-11 17:19:09 +03:00
#include <boost/variant2.hpp>
2019-06-03 17:50:13 +03:00
using namespace boost::variant2;
int main()
{
variant<float, int> v( 2 );
2019-06-03 18:48:13 +03:00
return get<1>( v ) == 2? 0: 1;
2019-06-03 17:50:13 +03:00
}