]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/optional/test/optional_test_fail1.cpp
1 // Copyright (C) 2003, Fernando Luis Cacciola Carballal.
3 // Use, modification, and distribution is subject to the Boost Software
4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 // See http://www.boost.org/lib/optional for documentation.
9 // You are welcome to contact the author at:
10 // fernando_cacciola@hotmail.com
12 #include "boost/optional.hpp"
15 // THIS TEST SHOULD FAIL TO COMPILE
17 void test_deep_constantness()
19 boost::optional
<int> opt
;
20 boost::optional
<int> const copt
;
22 *copt
= opt
; // Cannot assign to "int const&"