1 // Copyright (C) 2003, Fernando Luis Cacciola Carballal.
2 //
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)
6 //
7 // See http://www.boost.org/lib/optional for documentation.
8 //
9 // You are welcome to contact the author at:
10 //  [email protected]
11 //
12 #include "boost/optional.hpp"
13 
14 //
15 // THIS TEST SHOULD FAIL TO COMPILE
16 //
optional_reference__test_no_converting_initialization()17 void optional_reference__test_no_converting_initialization()
18 {
19   short v = 1 ;
20   short& r = v;
21   boost::optional<int&> opt(r) ;
22 }
23 
24 
25