|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r62825 - trunk/boost/format
From: steven_at_[hidden]
Date: 2010-06-11 19:13:33
Author: steven_watanabe
Date: 2010-06-11 19:13:32 EDT (Fri, 11 Jun 2010)
New Revision: 62825
URL: http://svn.boost.org/trac/boost/changeset/62825
Log:
Make Boost.Format work with the default libCstd on sun CC. Fixes #3894
Text files modified:
trunk/boost/format/alt_sstream_impl.hpp | 10 ++++++++++
trunk/boost/format/format_class.hpp | 2 +-
2 files changed, 11 insertions(+), 1 deletions(-)
Modified: trunk/boost/format/alt_sstream_impl.hpp
==============================================================================
--- trunk/boost/format/alt_sstream_impl.hpp (original)
+++ trunk/boost/format/alt_sstream_impl.hpp 2010-06-11 19:13:32 EDT (Fri, 11 Jun 2010)
@@ -37,7 +37,12 @@
str (const string_type& s) {
size_type sz=s.size();
if(sz != 0 && mode_ & (::std::ios_base::in | ::std::ios_base::out) ) {
+#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
+ void *vd_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0);
+ Ch *new_ptr = static_cast<Ch *>(vd_ptr);
+#else
Ch *new_ptr = alloc_.allocate(sz, is_allocated_? eback() : 0);
+#endif
// if this didnt throw, we're safe, update the buffer
dealloc();
sz = s.copy(new_ptr, sz);
@@ -249,7 +254,12 @@
add_size /= 2;
if(0 < add_size) {
new_size += add_size;
+#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
+ void *vdptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
+ newptr = static_cast<Ch *>(vdptr);
+#else
newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
+#endif
}
if(0 < prev_size)
Modified: trunk/boost/format/format_class.hpp
==============================================================================
--- trunk/boost/format/format_class.hpp (original)
+++ trunk/boost/format/format_class.hpp 2010-06-11 19:13:32 EDT (Fri, 11 Jun 2010)
@@ -68,7 +68,7 @@
{ return io::detail::feed<CharT, Tr, Alloc, T&>(*this,x); }
#endif
-#ifdef __GNUC__
+#if defined(__GNUC__)
// GCC can't handle anonymous enums without some help
// ** arguments passing ** //
basic_format& operator%(const int& x)
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