1 /////////////////////////////////////////////////////////////////////////////// 2 // Copyright 2019 John Maddock. Distributed under the Boost 3 // Software License, Version 1.0. (See accompanying file 4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 6 #include <boost/multiprecision/cpp_dec_float.hpp> 7 #include "test.hpp" 8 main()9int main() 10 { 11 try{ 12 std::locale::global(std::locale("en-US")); 13 boost::multiprecision::cpp_dec_float_50 d("1234.56"); 14 std::string s = d.str(); 15 16 BOOST_CHECK_EQUAL(s, "1234.56"); 17 } 18 catch(const std::runtime_error&){} // No en-US locale 19 20 return boost::report_errors(); 21 } 22 23 24