[prev in list] [next in list] [prev in thread] [next in thread]
List: boost
Subject: [boost] Fwd: [Boost-users] [format][patch][1.33.1][SunPro11]
From: Marc Mutz <marc () klaralvdalens-datakonsult ! se>
Date: 2006-07-09 16:57:19
Message-ID: 200607091857.20586.marc () klaralvdalens-datakonsult ! se
[Download RAW message or body]
Hi,
This patch is not in 1.34-rc1. What's the preferred way to submit those
things?
Thanks,
Marc
--
Marc Mutz -- marc@klaralvdalens-datakonsult.se, mutz@kde.org
Klarälvdalens Datakonsult AB, Platform-independent software solutions
["forwarded message" (message/rfc822)]
[Attachment #5 (multipart/signed)]
Hi,
SunPro (tested: v11, with current patches), needs the attached patch to compile
the following code:
--code--
using boost::format;
using boost::str;
void foo( const std::string & );
format fmt( "host=%1%,port=%2%" );
const std::string host = ...;
const unsigned short port = ...;
foo( str( fmt % host % port ) );
--/code--
--- /opt/boost/cc/1.33.1/include/boost-1_33_1/boost/format/alt_sstream_impl.hpp~ \
Sun Feb 27 03:06:57 2005
+++ /opt/boost/cc/1.33.1/include/boost-1_33_1/boost/format/alt_sstream_impl.hpp Mon \
Apr 24 18:07:09 2006 @@ -245,7 +245,7 @@
add_size /= 2;
if(0 < add_size) {
new_size += add_size;
- newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
+ newptr = static_cast<Ch*>(alloc_.allocate(new_size, \
is_allocated_? oldptr : 0)); }
if(0 < prev_size)
Thanks,
Marc
PS: Regarding the API: I don't much like the fact that format::operator%
changes the format instance. I would have liked to write "static const format"
in the code snippet above. Feels more natural ("do as the ints do"). I see where
the design comes from (speed optimization), but speed shouldn't dictate design.
Expression templates could be used to speed up the process.
--
Marc Mutz -- marc@klaralvdalens-datakonsult.se, mutz@kde.org
Klarälvdalens Datakonsult AB, Platform-independent software solutions
[Attachment #8 (application/pgp-signature)]
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic