
On Sat, Oct 24, 2009 at 8:09 PM, Diederick C. Niehorster
Hi,
I have just discovered boost::exception and am very happy I did. One thing i would like to do, but haven't yet figure out:
I have a matrix class for which I want to throw exceptions when out_of_range requests are made. One of the extra tags I want to attach is the dimensions of the matrix and it would be neat if i can put those in an array. Defining the tag is no problem, getting the info in there is:
defining: typedef boost::error_info
std_range_size; I have tried: << std_range_size({m_nRows, m_nCols}); size_t a[2] = {m_nRows, m_nCols}; << std_range_size(a); and desperately even << std_range_size() = {m_nRows, m_nCols}; which doesn't make much sense
Option 1, you can use boost::tuple with two separate tags:
#include