1 // Copyright (C) 2015, Andrzej Krzemienski. 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 // THIS TEST SHOULD FAIL TO COMPILE 15 16 enum E1 {e1}; 17 enum E2 {e2}; 18 test_converitng_assignment_of_different_enums()19void test_converitng_assignment_of_different_enums() 20 { 21 boost::optional<E2> o2(e2); 22 boost::optional<E1> o1; 23 o1 = o2; 24 } 25 main()26int main() {} 27