[date_time] time_zone_base.hpp should #include <sstream>

boost/date_time/time_zone_base.hpp uses std::basic_ostringstream without including standard library header <sstream>. Because of the missing header, date_time library test testlocal_time fails to compile on HP-UX/ia64 which uses Rogue Wave library 2.2. Can '#include <sstream>' be added to time_zone_base.hpp, in both 1.34 and HEAD? If not, can date_time library test testlocal_time be marked expected failure on HP-UX/ia64 (toolset "acc") ? Thanks, Boris

Boris Gubenko wrote:
boost/date_time/time_zone_base.hpp uses std::basic_ostringstream without including standard library header <sstream>. Because of the missing header, date_time library test testlocal_time fails to compile on HP-UX/ia64 which uses Rogue Wave library 2.2.
Can '#include <sstream>' be added to time_zone_base.hpp, in both 1.34 and HEAD?
Thx for the diagnostic -- fix checked in for both :-) Jeff

Jeff Garland wrote:
Thx for the diagnostic -- fix checked in for both :-)
Thank you! -boris ----- Original Message ----- From: "Jeff Garland" <jeff@crystalclearsoftware.com> To: <boost@lists.boost.org> Cc: "Boris Gubenko" <Boris.Gubenko@hp.com> Sent: Friday, February 23, 2007 10:36 AM Subject: Re: [boost] [date_time] time_zone_base.hpp should #include <sstream>
Boris Gubenko wrote:
boost/date_time/time_zone_base.hpp uses std::basic_ostringstream without including standard library header <sstream>. Because of the missing header, date_time library test testlocal_time fails to compile on HP-UX/ia64 which uses Rogue Wave library 2.2.
Can '#include <sstream>' be added to time_zone_base.hpp, in both 1.34 and HEAD?
Thx for the diagnostic -- fix checked in for both :-)
Jeff _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Hi! I have been struggling again recently with Boost.Function and Python bindings, and in order to use this library transparently from the Python side, I need to extract the contained function/functor, but only the type information available is a std::type_info object (available now with the new target_type() member function in RC_1_34_0), so I can not simply use the member function target<>(). Thus, I need an extra function to get the "raw" pointer to the contained function/functor. I played with the Boost.Function source code a little bit to see how it could be done. We only need to patch the file boost/function/function_base.hpp. The patched file is available here: http://tinyurl.com/ypa8vt I also put a patch file (a diff with the original function_base.hpp in RC_1_34_0) and a test file. The idea is, of course, to expose in some way the internal functor member (a detail::function::function_buffer object). I chose to simply add two member functions: void (*func_ptr() const)(); const void* obj_ptr() const; The distinction is required because, as we know, pointers to function and regular pointers can not be cast to and from each other. func_ptr() returns 0 if the content is actually a functor, and similarly, obj_ptr() returns 0 if the content is actually a pointer to function. Thus at the same time, it provides a way to test if the content is a pointer to function or not. Is there any interest to add this functionality to Boost.Function? -- François Duranleau LIGUM, Université de Montréal
participants (3)
-
Boris Gubenko
-
François Duranleau
-
Jeff Garland