Ticket #10882: boost_variant_bug.cpp

File boost_variant_bug.cpp, 372 bytes (added by Gabor Marton <martongabesz@…>, 8 years ago)
Line 
1#include <vector>
2#include <boost/blank.hpp>
3#include <boost/variant/variant.hpp>
4
5// If this include is removed, then it compiles.
6#include <boost/range/adaptor/filtered.hpp>
7
8struct A {};
9struct B {};
10
11void f() {
12 // If boost::blank is not used, then it compiles.
13 using Variant = boost::variant<boost::blank, A, B>;
14 Variant v1;
15 std::vector<Variant> vec{A{}, B{}};
16}
17