Imported Upstream version 1.64.0
[platform/upstream/boost.git] / libs / any / test / any_test_temporary_to_ref_failed.cpp
1 //  Unit test for boost::any.
2 //
3 //  See http://www.boost.org for most recent version, including documentation.
4 //
5 //  Copyright Antony Polukhin, 2013-2014.
6 //
7 //  Distributed under the Boost
8 //  Software License, Version 1.0. (See accompanying file
9 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt).
10
11 #include <cstdlib>
12 #include <string>
13 #include <utility>
14
15 #include <boost/any.hpp>
16 #include "test.hpp"
17 #include <boost/move/move.hpp>
18
19 #ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
20
21 int main() 
22 {
23     BOOST_STATIC_ASSERT(false);
24     return EXIT_SUCCESS;
25 }
26
27 #else 
28
29
30 int main()
31 {
32     int i = boost::any_cast<int&>(10);
33     (void)i;
34     return EXIT_SUCCESS;
35 }
36
37 #endif
38