[Bug c++/82406] New: [7 Regression] Rejects a valid snippet
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 2 14:36:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82406
Bug ID: 82406
Summary: [7 Regression] Rejects a valid snippet
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: jason at gcc dot gnu.org
Target Milestone: ---
Following code snippet (reduced from Chromium) is rejected with GCC 7.x:
$ cat error.ii
class a
{
public:
template <typename b> void operator() (b &&);
};
void c () throw () __attribute__ ((__nonnull__));
void
d ()
{
a e;
e (c);
}
$ g++-7 -std=c++17 -c error.ii
error.ii: In function ‘void d()’:
error.ii:11:7: error: no match for call to ‘(a) (void (&)() noexcept)’
e (c);
^
error.ii:4:30: note: candidate: void a::operator()(b&&) [with b = void (&)()
noexcept]
template <typename b> void operator() (b &&);
^~~~~~~~
error.ii:4:30: note: no known conversion for argument 1 from ‘void()
noexcept’ to ‘void (&)() noexcept’
It's accepted on trunk since r251911 and started to be rejected with r241944.
More information about the Gcc-bugs
mailing list