[Bug c++/57846] CRTP, templates, metaprogramming, forwarding and static member

2021-08-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57846

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |8.3

[Bug c++/57846] CRTP, templates, metaprogramming, forwarding and static member

2021-08-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57846

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=83160

--- Comment #4 from Andrew Pinski  ---
Fixed in GCC 8, most likely by the patch which fixed PR 83160.

[Bug c++/57846] CRTP, templates, metaprogramming, forwarding and static member

2014-12-13 Thread harald at gigawatt dot nl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57846

Harald van Dijk harald at gigawatt dot nl changed:

   What|Removed |Added

 CC||harald at gigawatt dot nl

--- Comment #3 from Harald van Dijk harald at gigawatt dot nl ---
Somewhat reduced:

template typename T
struct A
{
  template typename T2
  void f();
};

template typename T
struct B
{
  int f() const;

  template typename T2 = T, typename = decltype(AT2().template fT2(T2()))
  void f();

  void g() {
int *i = Bint().f();
  }
};

Accepted by clang 3.4.2, rejected by gcc 4.8.3 and 4.9.0 with:

test.cc: In member function ‘void BT::g()’:
test.cc:17:26: error: lvalue required as unary ‘’ operand

It seems to only happen when certain operators are used: there is no error when
doing e.g.

  int i = Bint().f();

[Bug c++/57846] CRTP, templates, metaprogramming, forwarding and static member

2014-12-12 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57846

Ville Voutilainen ville.voutilainen at gmail dot com changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-12-12
 CC||ville.voutilainen at gmail dot 
com
 Ever confirmed|0   |1
  Known to fail||4.8.2, 4.9.1, 5.0

--- Comment #2 from Ville Voutilainen ville.voutilainen at gmail dot com ---
We badly need a reduced testcase for this.


[Bug c++/57846] CRTP, templates, metaprogramming, forwarding and static member

2013-07-16 Thread vince.rev at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57846

--- Comment #1 from Vincent vince.rev at gmail dot com ---
Apparently, this is also a bug in the last version (4.9):
http://stackoverflow.com/questions/17515079/crtp-templates-metaprogramming-forwarding-and-static-member-a-bug-in-g-4-8