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

            Bug ID: 86044
           Summary: noexcept(false) of constexpr member function ignored
           Product: gcc
           Version: 8.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: johelegp at gmail dot com
  Target Milestone: ---

In the following snippet, the assertion fails if `constexpr` isn't commented
out. See https://godbolt.org/g/FCEHCb.

```C++
struct A {
};

template <class K>
struct H {
    constexpr
    int operator()(const K&) const noexcept(false)
    {
        return 0;
    }
};

static_assert(!noexcept(H<A>()(A())), "");
```

Reply via email to