[boost] Re: BOOST_TRY like macros: time to add them?
by Pavel Vozenilek other posts by this author
Feb 29 2004 10:32AM messages near this date
[boost] What happened to the minmax library?
|
[boost] Review schedule too slow?
SOURCE
"John Maddock" <john@[...].uk> wrote
[BOOST_TRY like macros]
> > BCB gives unreachable
> > code warning (but I'll try to find workaround).
>
> I doubt you'll find a satisfactory one, there are pragmas that can disable
> those warnings, but that introduces even more code than the traditional:
>
For BCB this works without warning:
if (!"") { ... }
> I suggest we review these when the first of these lib's comes up for
review,
> anyone else want to comment?
>
First library to review is circular_buffer and this one uses less
generic macros:
#if !defined(BOOST_NO_EXCEPTIONS)
#define BOOST_CB_TRY try {
#define BOOST_CB_UNWIND(action) } catch(...) { action; throw; }
#else
#define BOOST_CB_TRY
#define BOOST_CB_UNWIND(action)
#endif
-------------------------------
I would suggest to add:
#if !defined(BOOST_NO_EXCEPTIONS)
# define BOOST_TRY try
# define BOOST_CATCH(x) catch(x)
# define BOOST_RETHROW throw
#else
# define BOOST_TRY#
# define BOOST_CATCH(x) if(0)
# define BOOST_RETHROW
#endif
/Pavel
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
|