]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/utility/test/initialized_test_fail1.cpp
1 // Copyright 2010, Niels Dekker.
3 // Distributed under the Boost Software License, Version 1.0. (See
4 // accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 // Test program for boost::initialized<T>. Must fail to compile.
11 #include <boost/utility/value_init.hpp>
15 void direct_initialize_from_int()
17 // Okay: initialized<T> supports direct-initialization from T.
18 boost::initialized
<int> direct_initialized_int(1);
21 void copy_initialize_from_int()
23 // The following line should not compile, because initialized<T>
24 // was not intended to supports copy-initialization from T.
25 boost::initialized
<int> copy_initialized_int
= 1;
31 // This should fail to compile, so there is no need to call any function.