1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s -Wno-defaulted-function-deleted 2 // RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -DCXX_EXCEPTIONS -fsyntax-only -verify %s -Wno-defaulted-function-deleted 3 // expected-no-diagnostics 4 5 template <class _Tp> struct is_nothrow_move_constructible { 6 static const bool value = false; 7 }; 8 9 template <class _Tp> 10 class allocator; 11 12 template <> 13 class allocator<char> {}; 14 15 template <class _Allocator> 16 class basic_string { 17 typedef _Allocator allocator_type; 18 basic_string(basic_string &&__str) 19 noexcept(is_nothrow_move_constructible<allocator_type>::value); 20 }; 21 22 class Foo { 23 Foo(Foo &&) noexcept = default; 24 Foo &operator=(Foo &&) noexcept = default; 25 basic_string<allocator<char> > vectorFoo_; 26 }; 27