Opened 13 years ago
Closed 12 years ago
#3894 closed Patches (fixed)
Trivial patch to fix compilation with Sun CC in alt stringstream
Reported by: | Owned by: | Samuel Krempp | |
---|---|---|---|
Milestone: | Boost 1.44.0 | Component: | format |
Version: | Boost 1.42.0 | Severity: | Problem |
Keywords: | suncc | Cc: |
Description
The following trivial patch fixes compilation of boost/format/alt_sstream_impl.hpp
with Sun CC:
-
boost/format/alt_sstream_impl.hpp
a b 249 249 add_size /= 2; 250 250 if(0 < add_size) { 251 251 new_size += add_size; 252 newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);252 newptr = static_cast<Ch *>(alloc_.allocate(new_size, is_allocated_? oldptr : 0)); 253 253 } 254 254 255 255 if(0 < prev_size)
I don't know why (as I don't know this code at all...) but allocate()
returns void *
and not char *
in this STL implementation so it fails to compile without an explicit cast.
Maybe there is a better way to deal with this but I hope that if no other solution is found, this patch could be applied to allow to use Boost with Sun CC with its (old and broken...) standard library.
TIA!
Change History (4)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Well, yes, it's broken but if you can't avoid using it (because customers code links with it and not STLport (which, BTW, is broken in its own, different, ways)) this trivial change still allows you to compile the code and our code that uses this header does work (well, as far as unit tests show, anyhow). So while, as mentioned in #3893, I don't plan to work around all bugs in Sun^H^H^H
Oracle STL it would still be nice if some simple ones to work around could be fixed.
comment:4 by , 12 years ago
Milestone: | Boost 1.43.0 → Boost 1.44.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
This fix was included in 1.44.0.
Closing.
Boost only supports the stlport standard library with Sun CC. The default standard library is quite broken in many other ways as well.