
Hi Emil,
On Sun, Oct 25, 2009 at 3:06 PM, Emil Dotchevski
Or (if you throw std::out_of_range a lot) just derive from it and boost::exception, then you don't need to use enable_error_info:
struct my_out_of_range: virtual std::out_of_range, virtual boost::exception { };
BOOST_THROW_EXCEPTION(my_out_of_range() << std_range_which(Rows()!=M.Rows()? "row" : "col");
This does not compile (on VS2008), giving me at call site: error C2512: 'my_out_of_range::my_out_of_range' : no appropriate default constructor available I have tried adding a default constructor, struct my_out_of_range: virtual std::out_of_range, virtual boost::exception {my_out_of_range(){};}; but then i get the error: error C2512: 'std::out_of_range::out_of_range' : no appropriate default constructor available I must be missing something painfully obvious here, but can't figure it out. Do you know what is going wrong? Best and thanks, Diederick