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

            Bug ID: 78048
           Summary: noexcept operator does not work properly when
                    substitution required
           Product: gcc
           Version: 6.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: michele.caini at gmail dot com
  Target Milestone: ---

The following code performs an invalid substitution:

    #include<type_traits>

    struct S {
        template<typename T>
        std::enable_if_t<not std::is_void<T>::value>
        g() {}
    };

    int main() {
        static_assert(noexcept(&S::g<void>), "!");
    }

GCC compiles it, but it should be rejected.

---

Here a discussion on SO:
http://stackoverflow.com/questions/40141702/noexcept-operator-and-enable-if-t-do-they-work-together

Reply via email to