108235661cf457978ba4645ec8e22697aebabe4faAlp Toker// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s 208235661cf457978ba4645ec8e22697aebabe4faAlp Toker// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -DCXX_EXCEPTIONS -fsyntax-only -verify %s 308235661cf457978ba4645ec8e22697aebabe4faAlp Toker 408235661cf457978ba4645ec8e22697aebabe4faAlp Tokertemplate <class _Tp> struct is_nothrow_move_constructible { 508235661cf457978ba4645ec8e22697aebabe4faAlp Toker static const bool value = false; 608235661cf457978ba4645ec8e22697aebabe4faAlp Toker}; 708235661cf457978ba4645ec8e22697aebabe4faAlp Toker 808235661cf457978ba4645ec8e22697aebabe4faAlp Tokertemplate <class _Tp> 908235661cf457978ba4645ec8e22697aebabe4faAlp Tokerclass allocator; 1008235661cf457978ba4645ec8e22697aebabe4faAlp Toker 1108235661cf457978ba4645ec8e22697aebabe4faAlp Tokertemplate <> 1208235661cf457978ba4645ec8e22697aebabe4faAlp Tokerclass allocator<char> {}; 1308235661cf457978ba4645ec8e22697aebabe4faAlp Toker 1408235661cf457978ba4645ec8e22697aebabe4faAlp Tokertemplate <class _Allocator> 1508235661cf457978ba4645ec8e22697aebabe4faAlp Tokerclass basic_string { 1608235661cf457978ba4645ec8e22697aebabe4faAlp Toker typedef _Allocator allocator_type; 1708235661cf457978ba4645ec8e22697aebabe4faAlp Toker basic_string(basic_string &&__str) 1808235661cf457978ba4645ec8e22697aebabe4faAlp Toker noexcept(is_nothrow_move_constructible<allocator_type>::value); 1908235661cf457978ba4645ec8e22697aebabe4faAlp Toker}; 2008235661cf457978ba4645ec8e22697aebabe4faAlp Toker 2108235661cf457978ba4645ec8e22697aebabe4faAlp Tokerclass Foo { 2208235661cf457978ba4645ec8e22697aebabe4faAlp Toker Foo(Foo &&) noexcept = default; 2308235661cf457978ba4645ec8e22697aebabe4faAlp Toker#ifdef CXX_EXCEPTIONS 2408235661cf457978ba4645ec8e22697aebabe4faAlp Toker// expected-error@-2 {{does not match the calculated}} 2508235661cf457978ba4645ec8e22697aebabe4faAlp Toker#else 2608235661cf457978ba4645ec8e22697aebabe4faAlp Toker// expected-no-diagnostics 2708235661cf457978ba4645ec8e22697aebabe4faAlp Toker#endif 2808235661cf457978ba4645ec8e22697aebabe4faAlp Toker Foo &operator=(Foo &&) noexcept = default; 2908235661cf457978ba4645ec8e22697aebabe4faAlp Toker basic_string<allocator<char> > vectorFoo_; 3008235661cf457978ba4645ec8e22697aebabe4faAlp Toker}; 31