[Bug c++/71568] Inexplicable error: "X is inaccessible within this context" for a public member

jaak at ristioja dot ee gcc-bugzilla@gcc.gnu.org
Thu Feb 23 10:44:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71568

--- Comment #1 from Jaak Ristioja <jaak at ristioja dot ee> ---
After trying to minimize the code, this still seems to trigger the same error:


#include <tuple>

template <typename> using whatever = void;

template<typename, typename = void> struct has_f;

template <typename T>
struct has_f<T, whatever<decltype( &T::f )>> {};

struct X {
  void f() const {}
};

using t = has_f<std::tuple<X> >::asdf;


This is quite weird indeed.


More information about the Gcc-bugs mailing list