[Bug c++/92078] error: 'struct std::ptr<Iter>' redeclared with different access
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Oct 12 11:48:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92078
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2019-10-12
Ever confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is not a redeclaration, it's a specialization. And it doesn't have
different access to the other specialization anyway.
Reduced:
template<typename I>
struct iterator_traits
{
private:
template<typename Iter>
struct ptr
{ };
template<typename J> requires requires { typename J::X; }
struct ptr<J>
{ };
template<typename J>
requires (!requires { typename J::X; } && requires { typename J::Y; })
struct ptr<J>
{ };
};
access.cc:17:7: error: ‘struct ptr<J>’ redeclared with different access
17 | struct ptr<J>
| ^~~~~~
More information about the Gcc-bugs
mailing list