1 // 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 
4 template <class _Tp> struct is_nothrow_move_constructible {
5   static const bool value = false;
6 };
7 
8 template <class _Tp>
9 class allocator;
10 
11 template <>
12 class allocator<char> {};
13 
14 template <class _Allocator>
15 class basic_string {
16   typedef _Allocator allocator_type;
17   basic_string(basic_string &&__str)
18   noexcept(is_nothrow_move_constructible<allocator_type>::value);
19 };
20 
21 class 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 };
31