Hi. Calling boost::gregorian::from_string with string value = 2003-07-28 produces a range exception, i.e. year supposedly does not fall inside the range covered by boost::gregorian::date!!!! Any suggestions? Greetings, Andre.
On Tue, 09 Sep 2003 11:04:32 +0200, Andre du Toit wrote
Hi.
Calling boost::gregorian::from_string with string value = 2003-07-28 produces a range exception, i.e. year supposedly does not fall inside the range covered by boost::gregorian::date!!!!
Any suggestions?
Which boost? What platform? Exact code? using namespace boost::gregorian; std::string s1("2003-07-28"); date d1(from_string(s1)); This works fine for me on gcc 3.2, linux. Jeff
Boost gurus,
I am using boost::bind in combination with boost::signals for a GUI
toolkit. The signals return bool for convenience, but it is often
desireable to bind a void function and connect it to a signal. Is there
a convenient way to assign a return value for a void function.
As an example:
-----------------------------------------------------------------
struct panel
{
void print() { std::cout << "print" << std::endl; }
}
struct widget
{
boost::signal
Darren Vincent Hart wrote:
Boost gurus,
I am using boost::bind in combination with boost::signals for a GUI toolkit. The signals return bool for convenience, but it is often desireable to bind a void function and connect it to a signal. Is there a convenient way to assign a return value for a void function.
As an example:
-----------------------------------------------------------------
struct panel { void print() { std::cout << "print" << std::endl; } }
struct widget { boost::signal
on_event; } panel p; widget w;
// is there some way to do something like this? w.on_event.connect(boost::bind_return(panel::print, &p, true));
You can do this with Lambda:
using namespace boost::lambda;
w.on_event.connect( (bind(panel::print, &p), true) );
but not with boost::bind, sorry.
Not out of the box, anyway.
template
participants (4)
-
Andre du Toit
-
Darren Vincent Hart
-
Jeff Garland
-
Peter Dimov