• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // UNSUPPORTED: c++98, c++03, c++11
11 
12 // <experimental/any>
13 
14 // any() noexcept;
15 
16 #include <experimental/any>
17 #include <type_traits>
18 #include <cassert>
19 
20 #include "experimental_any_helpers.h"
21 #include "count_new.hpp"
22 
23 
main()24 int main()
25 {
26     using std::experimental::any;
27     {
28         static_assert(
29             std::is_nothrow_default_constructible<any>::value
30           , "Must be default constructible"
31           );
32     }
33     {
34         DisableAllocationGuard g; ((void)g);
35         any const a;
36         assertEmpty(a);
37     }
38 }
39