blob: 4d9355974c9e6e0919db3c833b0c032eafbe4968 [file] [log] [blame]
Alp Toker08235662013-10-18 05:54:19 +00001// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
2// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -DCXX_EXCEPTIONS -fsyntax-only -verify %s
3
4template <class _Tp> struct is_nothrow_move_constructible {
5 static const bool value = false;
6};
7
8template <class _Tp>
9class allocator;
10
11template <>
12class allocator<char> {};
13
14template <class _Allocator>
15class basic_string {
16 typedef _Allocator allocator_type;
17 basic_string(basic_string &&__str)
18 noexcept(is_nothrow_move_constructible<allocator_type>::value);
19};
20
21class Foo {
22 Foo(Foo &&) noexcept = default;
23#ifdef CXX_EXCEPTIONS
24// expected-error@-2 {{does not match the calculated}}
25#else
26// expected-no-diagnostics
27#endif
28 Foo &operator=(Foo &&) noexcept = default;
29 basic_string<allocator<char> > vectorFoo_;
30};