instantiation-depth-exception-spec.cpp 529 B

1234567891011
  1. // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -ftemplate-depth 16 -fcxx-exceptions -fexceptions %s
  2. template<typename T> T go(T a) noexcept(noexcept(go(a))); // \
  3. // expected-error 16{{call to function 'go' that is neither visible}} \
  4. // expected-note 16{{'go' should be declared prior to the call site}} \
  5. // expected-error {{recursive template instantiation exceeded maximum depth of 16}}
  6. void f() {
  7. int k = go(0); // \
  8. // expected-note {{in instantiation of exception specification for 'go<int>' requested here}}
  9. }