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