ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved