Re: [v3, patch, variant] user-defined operator& and std::variant

2016-09-05 Thread Tim Shen
On Sat, Sep 3, 2016 at 12:46 PM, Mikhail Strelnikov wrote: > Hello, > > Following code does not compile, > > #include > > namespace n > { > template > void operator&(T) {} > struct s{}; > } > > int main() > { > std::variant v; > std::get(v); > } > > error:

[v3, patch, variant] user-defined operator& and std::variant

2016-09-03 Thread Mikhail Strelnikov
Hello, Following code does not compile, #include namespace n { template void operator&(T) {} struct s{}; } int main() { std::variant v; std::get(v); } error: include/c++/7.0.0/variant:315:4: error: invalid static_cast diff -r -u a/libstdc++-v3/include/std/variant