view gcc/testsuite/g++.dg/cpp0x/noexcept39.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
line wrap: on
line source

// PR c++/89612
// { dg-do compile { target c++11 } }

template <typename T>
struct C {
  template <int N>
  friend void foo(T t) noexcept(sizeof(decltype(t)) > 1);

  template <int N>
  friend void foo2(T t) noexcept(sizeof(decltype(t)) < 1); // { dg-error "different exception" }
};

template <int N>
void foo(int i) noexcept { }

template <int N>
void foo2(int i) noexcept { }

C<int> c;