From: Hendrik Schober (boost_at_[hidden])
Date: 2001-11-12 15:14:57
"Peter Dimov" <pdimov_at_[hidden]> wrote:
> From: "Darin Adler" <darin_at_[hidden]>
> > I think it would be nice to include the function name for compilers that
> > provide it. In the future, I predict this will be in all C++ compilers, so
> > think it's prudent to plan for that. It's so much nicer to include the
> > function name that I think it's worth a slight headache. But if there's no
> > good way to detect the presence of the feature without including
> > Boost.Config, that's probably a dealbreaker.
> How, and where, should we include the function name? Do you mean as a
> parameter to boost_error?
> > > #define BOOST_ERROR(expr) (expr || !boost_error(#expr, __FILE__,
I have a macro which I'm using for my exceptions. It
passes '__FILE__', '__LINE__', if the compiler supports
it, '__func__' (or whatever's the compilers equivalent),
and, if the user wants, also '__DATE__' and '__TIME__'.
At the point of definition of this macro those decisions
are settled. Then I always use it (instead of using e.g.
> Peter Dimov
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk