From aba423d425b6e8eed4aa70c82a674cac9cc9f038 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Fri, 29 Jul 2011 19:33:18 +0000 Subject: [PATCH] Fixes #5732. * one more try to fix compilation errors on pgi compiler [SVN r73435] --- include/boost/lexical_cast.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/boost/lexical_cast.hpp b/include/boost/lexical_cast.hpp index 4690a9e..48fdda7 100644 --- a/include/boost/lexical_cast.hpp +++ b/include/boost/lexical_cast.hpp @@ -1156,7 +1156,7 @@ namespace boost { using namespace std; if (put_inf_nan(start,finish,val)) return true; finish = start + swprintf(out, -#ifndef __MINGW32__ +#if !defined(__MINGW32__) && !defined(__PGIC__) finish-start, #endif L"%.*g", static_cast(boost::detail::lcast_get_precision()), val ); @@ -1176,7 +1176,7 @@ namespace boost * Standard. */ finish = start + swprintf(out, -#ifndef __MINGW32__ +#if !defined(__MINGW32__) && !defined(__PGIC__) finish-start, #endif L"%.*lg", static_cast(boost::detail::lcast_get_precision()), val ); @@ -1187,7 +1187,10 @@ namespace boost bool shl_long_double(long double val,wchar_t* out) { using namespace std; if (put_inf_nan(start,finish,val)) return true; - finish = start + swprintf(out,finish-start, + finish = start + swprintf(out, +#if !defined(__PGIC__) + finish-start, +#endif L"%.*Lg", static_cast(boost::detail::lcast_get_precision()), val ); return finish > start; }