1 // Copyright 2018 James E. King III. Use, modification and 2 // distribution is subject to the Boost Software License, Version 3 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 // http://www.boost.org/LICENSE_1_0.txt) 5 6 #include <boost/logic/tribool.hpp> 7 main(int,char * [])8int main(int, char*[]) 9 { 10 using boost::logic::indeterminate; 11 using boost::logic::tribool; 12 13 tribool i(indeterminate); 14 15 #if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) 16 bool b = i; // expect to see: no viable conversion from 'boost::logic::tribool' to 'bool' 17 return (int)b; 18 #else 19 #error in c++03 explicit conversions are allowed 20 #endif 21 // NOTREACHED 22 return 0; 23 } 24