comparison DEPENDENCIES/generic/include/boost/math/concepts/real_concept.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
comparison
equal deleted inserted replaced
100:793467b5e61c 101:c530137014c0
83 #endif 83 #endif
84 real_concept(float c) : m_value(c){} 84 real_concept(float c) : m_value(c){}
85 real_concept(double c) : m_value(c){} 85 real_concept(double c) : m_value(c){}
86 real_concept(long double c) : m_value(c){} 86 real_concept(long double c) : m_value(c){}
87 #ifdef BOOST_MATH_USE_FLOAT128 87 #ifdef BOOST_MATH_USE_FLOAT128
88 real_concept(__float128 c) : m_value(c){} 88 real_concept(BOOST_MATH_FLOAT128_TYPE c) : m_value(c){}
89 #endif 89 #endif
90 90
91 // Assignment: 91 // Assignment:
92 real_concept& operator=(char c) { m_value = c; return *this; } 92 real_concept& operator=(char c) { m_value = c; return *this; }
93 real_concept& operator=(unsigned char c) { m_value = c; return *this; } 93 real_concept& operator=(unsigned char c) { m_value = c; return *this; }
305 // 305 //
306 double v; 306 double v;
307 is >> v; 307 is >> v;
308 a = v; 308 a = v;
309 return is; 309 return is;
310 #elif defined(__SGI_STL_PORT) || defined(_RWSTD_VER) || defined(__LIBCOMO__) 310 #elif defined(__SGI_STL_PORT) || defined(_RWSTD_VER) || defined(__LIBCOMO__) || defined(_LIBCPP_VERSION)
311 std::string s; 311 std::string s;
312 real_concept_base_type d; 312 real_concept_base_type d;
313 is >> s; 313 is >> s;
314 std::sscanf(s.c_str(), "%Lf", &d); 314 std::sscanf(s.c_str(), "%Lf", &d);
315 a = d; 315 a = d;
326 326
327 namespace tools 327 namespace tools
328 { 328 {
329 329
330 template <> 330 template <>
331 inline concepts::real_concept make_big_value<concepts::real_concept>(long double val, const char* , mpl::false_ const&, mpl::false_ const&) 331 inline concepts::real_concept make_big_value<concepts::real_concept>(boost::math::tools::largest_float val, const char* , mpl::false_ const&, mpl::false_ const&)
332 { 332 {
333 return val; // Can't use lexical_cast here, sometimes it fails.... 333 return val; // Can't use lexical_cast here, sometimes it fails....
334 } 334 }
335 335
336 template <> 336 template <>