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 &t) {
return t.i_;
}
}
}
template class variant {
public:
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 = std::get(v);
}
2 matches
Mail list logo