$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Pavel Syomin (syomin_at_[hidden])
Date: 2007-07-25 02:01:23
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?