15a83710eSEric Fiselier //===----------------------------------------------------------------------===//
25a83710eSEric Fiselier //
357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
65a83710eSEric Fiselier //
75a83710eSEric Fiselier //===----------------------------------------------------------------------===//
85a83710eSEric Fiselier 
9*31cbe0f2SLouis Dionne // UNSUPPORTED: c++03
107196ee31SEric Fiselier 
115a83710eSEric Fiselier // <stack>
125a83710eSEric Fiselier 
135a83710eSEric Fiselier // stack()
145a83710eSEric Fiselier //        noexcept(is_nothrow_default_constructible<container_type>::value);
155a83710eSEric Fiselier 
165a83710eSEric Fiselier // This tests a conforming extension
175a83710eSEric Fiselier 
18f2f2a639SEric Fiselier 
195a83710eSEric Fiselier #include <stack>
205a83710eSEric Fiselier #include <cassert>
215a83710eSEric Fiselier 
22a9fb19d3SEric Fiselier #include "test_macros.h"
23949389c3SMarshall Clow #include "MoveOnly.h"
245a83710eSEric Fiselier 
main(int,char **)252df59c50SJF Bastien int main(int, char**)
265a83710eSEric Fiselier {
272662e56dSEric Fiselier #if defined(_LIBCPP_VERSION)
285a83710eSEric Fiselier     {
295a83710eSEric Fiselier         typedef std::stack<MoveOnly> C;
3003fe6e2dSStephan T. Lavavej         static_assert(std::is_nothrow_default_constructible<C>::value, "");
315a83710eSEric Fiselier     }
322662e56dSEric Fiselier #endif
332df59c50SJF Bastien 
342df59c50SJF Bastien   return 0;
355a83710eSEric Fiselier }
36