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

--- Comment #1 from Ido Kessler <kessido at gmail dot com> ---
(In reply to Ido Kessler from comment #0)
> As far as I could verify this has not been mention anywhere.
> 
> Versions: g++-9 (all versions I tried). Was fixed in g++-10.
> Compiler flags: -fconcepts -std=c++17
> Symptoms: The following line cause any code after it to ignore access
> modifiers:
> 
> class A {
>     int x;
> };
> 
> template<typename T, typename U>
> concept ConceptWithTwoImputs = true;
> 
> template<typename T>
> concept ConceptThatUsesIt = requires(T t) {
>     {t} -> ConceptWithTwoImputs<bool>; // problematic line.
> };
> 
> int main() {
>     A a;
>     a.x = 1;
> }
> 
> If you comment this line, it would result in "error: 'int A::x' is private
> within this context".

Inputs* (typo)

Also changing the line to:
{t} -> bool; // problematic line.
works.

Reply via email to