quick.cpp 293 B

123456789101112131415
  1. // Copyright 2019 Peter Dimov.
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // http://www.boost.org/LICENSE_1_0.txt
  5. #include <boost/variant2/variant.hpp>
  6. using namespace boost::variant2;
  7. int main()
  8. {
  9. variant<float, int> v( 2 );
  10. return get<1>( v ) == 2? 0: 1;
  11. }