|
Boost-Commit : |
From: john_at_[hidden]
Date: 2007-12-15 07:50:08
Author: johnmaddock
Date: 2007-12-15 07:50:08 EST (Sat, 15 Dec 2007)
New Revision: 42068
URL: http://svn.boost.org/trac/boost/changeset/42068
Log:
Merge MSVC warning suppression #pragma's from Trunk.
Text files modified:
branches/release/boost/format/feed_args.hpp | 10 ++++++++++
branches/release/boost/format/format_implementation.hpp | 10 ++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
Modified: branches/release/boost/format/feed_args.hpp
==============================================================================
--- branches/release/boost/format/feed_args.hpp (original)
+++ branches/release/boost/format/feed_args.hpp 2007-12-15 07:50:08 EST (Sat, 15 Dec 2007)
@@ -125,6 +125,13 @@
typename basic_format<Ch, Tr, Alloc>::internal_streambuf_t & buf,
io::detail::locale_t *loc_p = NULL)
{
+#ifdef BOOST_MSVC
+ // If std::min<unsigned> or std::max<unsigned> are already instantiated
+ // at this point then we get a blizzard of warning messages when we call
+ // those templates with std::size_t as arguments. Weird and very annoyning...
+#pragma warning(push)
+#pragma warning(disable:4267)
+#endif
// does the actual conversion of x, with given params, into a string
// using the supplied stringbuf.
@@ -227,6 +234,9 @@
}
}
buf.clear_buffer();
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
} // end- put(..)
Modified: branches/release/boost/format/format_implementation.hpp
==============================================================================
--- branches/release/boost/format/format_implementation.hpp (original)
+++ branches/release/boost/format/format_implementation.hpp 2007-12-15 07:50:08 EST (Sat, 15 Dec 2007)
@@ -203,6 +203,13 @@
template< class Ch, class Tr, class Alloc>
typename std::basic_string<Ch, Tr, Alloc>::size_type basic_format<Ch,Tr, Alloc>::
size () const {
+#ifdef BOOST_MSVC
+ // If std::min<unsigned> or std::max<unsigned> are already instantiated
+ // at this point then we get a blizzard of warning messages when we call
+ // those templates with std::size_t as arguments. Weird and very annoyning...
+#pragma warning(push)
+#pragma warning(disable:4267)
+#endif
BOOST_USING_STD_MAX();
size_type sz = prefix_.size();
unsigned long i;
@@ -215,6 +222,9 @@
sz += item.appendix_.size();
}
return sz;
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
}
namespace io {
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk