Pavel Syomin wrote:
1. How to escape converting BOOST_CURRENT_FUNCTION to std::string? Is there way to get function name as string literal?
Some compilers support __FUNCTION__ macro.
Thanks,
Boris
----- Original Message -----
From: "Pavel Syomin"
Hi all! New variant of BOOST_ENFORCE macro:
#define BOOST_ENFORCE(expression) \ do { \ if(!(expression)) throw std::invalid_argument( \ __FILE__ " : " BOOST_STRINGIZE(__LINE__) " : " \ + std::string(BOOST_CURRENT_FUNCTION) + \ " : Expression '" #expression "' failed"); \ } while(false)
And few question about it: 1. How to escape converting BOOST_CURRENT_FUNCTION to std::string? Is there way to get function name as string literal? 2. Is line number useful information? I think, that filename and function name is good enough. 3. Any observations and suggestions? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users