Bug#877838: clang-5.0: c++17 std::get(std::variant) fails to compile with libstdc++

2017-10-06 Thread Daniele Di Proietto
It appears that clang is ignoring a friend declaration, while gcc is not. This simplified version of the program shows the problem: $ cat variant.cpp namespace __detail { namespace __variant { template decltype(auto) __get(const T ) { return t.i_; } } } template class variant { public:

Bug#877838: clang-5.0: c++17 std::get(std::variant) fails to compile with libstdc++

2017-10-05 Thread Daniele Di Proietto
Package: clang-5.0 Version: 1:5.0~+rc2-1 Severity: normal Dear Maintainer, I'm trying to compile c++17 code that uses `std::get(std::variant)`. It appears to work with g++-7, but it fails with clang++-5.0. $ cat variant.cc #include int main() { std::variant v{42}; int i =