[Bug c++/56643] Failure to match noexcept specifier of friend template function in template class

2019-04-04 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56643

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |9.0

--- Comment #6 from Paolo Carlini  ---
Done.

[Bug c++/56643] Failure to match noexcept specifier of friend template function in template class

2019-04-04 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56643

--- Comment #5 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Thu Apr  4 15:15:59 2019
New Revision: 270144

URL: https://gcc.gnu.org/viewcvs?rev=270144=gcc=rev
Log:
2019-04-04  Paolo Carlini  

PR c++/56643
* g++.dg/cpp0x/noexcept40.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/noexcept40.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/56643] Failure to match noexcept specifier of friend template function in template class

2019-04-04 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56643

--- Comment #4 from Paolo Carlini  ---
This is fixed in trunk, I'm adding the testcase and closing the bug.

[Bug c++/56643] Failure to match noexcept specifier of friend template function in template class

2019-01-24 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56643

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code,
   ||rejects-valid
   Last reconfirmed|2013-03-17 00:00:00 |2019-1-24

--- Comment #3 from Jonathan Wakely  ---
This was rejects-valid in GCC 4.9 but since GCC 5 is ice-on-valid-code

[Bug c++/56643] Failure to match noexcept specifier of friend template function in template class

2014-07-24 Thread Casey at Carter dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56643

--- Comment #2 from Casey Carter Casey at Carter dot net ---
For future readers, I believe the simplest workaround is to make the friend
function a static member function of a new class, friend that class instead of
the function, and introduce a simple forwarding function in the original
function's place:

template int N
struct Test {
friend struct workaround_56643;
};

struct workaround_56643 {
template int N
static void test(TestN) noexcept(N == 0) {}
};

template int N
auto test(TestN arg)
  noexcept(noexcept(workaround_56643::test(arg)))
- decltype(workaround_56643::test(arg)) {
 return workaround_56643::test(arg);
}

int main() {
Test0 t;
test(t);
}


[Bug c++/56643] Failure to match noexcept specifier of friend template function in template class

2013-03-17 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56643



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 Status|UNCONFIRMED |NEW

   Last reconfirmed||2013-03-17

Version|4.7.3   |4.9.0

 Ever Confirmed|0   |1



--- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com 2013-03-17 
20:27:02 UTC ---

Confirmed.