forked from boostorg/conversion
Fixes #5732.
* fixes compilation errors pgi compiler * fixes some bugs for MinGW compiler [SVN r73384]
This commit is contained in:
@@ -47,6 +47,10 @@
|
|||||||
#include <boost/detail/lcast_precision.hpp>
|
#include <boost/detail/lcast_precision.hpp>
|
||||||
#include <boost/detail/workaround.hpp>
|
#include <boost/detail/workaround.hpp>
|
||||||
|
|
||||||
|
#ifdef __PGI
|
||||||
|
#include <cwchar>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef BOOST_NO_STD_LOCALE
|
#ifndef BOOST_NO_STD_LOCALE
|
||||||
# include <locale>
|
# include <locale>
|
||||||
#else
|
#else
|
||||||
@@ -1134,7 +1138,7 @@ namespace boost
|
|||||||
finish = start + sprintf(out,"%.*lg", static_cast<int>(boost::detail::lcast_get_precision<double >()), val );
|
finish = start + sprintf(out,"%.*lg", static_cast<int>(boost::detail::lcast_get_precision<double >()), val );
|
||||||
return finish > start;
|
return finish > start;
|
||||||
}
|
}
|
||||||
|
#ifndef __MINGW32__
|
||||||
template <class T>
|
template <class T>
|
||||||
bool shl_long_double(long double val,T* out)
|
bool shl_long_double(long double val,T* out)
|
||||||
{ using namespace std;
|
{ using namespace std;
|
||||||
@@ -1142,6 +1146,7 @@ namespace boost
|
|||||||
finish = start + sprintf(out,"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val );
|
finish = start + sprintf(out,"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val );
|
||||||
return finish > start;
|
return finish > start;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (defined _MSC_VER)
|
#if (defined _MSC_VER)
|
||||||
# pragma warning( pop )
|
# pragma warning( pop )
|
||||||
@@ -1180,16 +1185,16 @@ namespace boost
|
|||||||
return finish > start;
|
return finish > start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __MINGW32__
|
||||||
bool shl_long_double(long double val,wchar_t* out)
|
bool shl_long_double(long double val,wchar_t* out)
|
||||||
{ using namespace std;
|
{ using namespace std;
|
||||||
if (put_inf_nan(start,finish,val)) return true;
|
if (put_inf_nan(start,finish,val)) return true;
|
||||||
finish = start + swprintf(out,
|
finish = start + swprintf(out,finish-start,
|
||||||
#ifndef __MINGW32__
|
L"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val );
|
||||||
finish-start,
|
|
||||||
#endif
|
|
||||||
L"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val );
|
|
||||||
return finish > start;
|
return finish > start;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/************************************ OPERATORS << ( ... ) ********************************/
|
/************************************ OPERATORS << ( ... ) ********************************/
|
||||||
@@ -1242,7 +1247,13 @@ namespace boost
|
|||||||
#endif
|
#endif
|
||||||
bool operator<<(float val) { return shl_float(val,start); }
|
bool operator<<(float val) { return shl_float(val,start); }
|
||||||
bool operator<<(double val) { return shl_double(val,start); }
|
bool operator<<(double val) { return shl_double(val,start); }
|
||||||
bool operator<<(long double val) { return shl_long_double(val,start); }
|
bool operator<<(long double val) {
|
||||||
|
#ifndef __MINGW32__
|
||||||
|
return shl_long_double(val,start);
|
||||||
|
#else
|
||||||
|
return shl_double(val,start);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
template<class InStreamable>
|
template<class InStreamable>
|
||||||
bool operator<<(const InStreamable& input) { return shl_input_streamable(input); }
|
bool operator<<(const InStreamable& input) { return shl_input_streamable(input); }
|
||||||
|
Reference in New Issue
Block a user