Boost logo

Boost :

From: Dave Steffen (dgsteffen_at_[hidden])
Date: 2005-10-14 18:47:26


Hey Folks,

  Coming back to this topic after several months...

Paul Mensonides writes:

> Well, here's a BOOST_SEMICOLON definition, in case anyone is interested (no
> #include-guard required):
>
> // <boost/semicolon.hpp>
>
> namespace boost { namespace empty { } }
>
> #define BOOST_SEMICOLON \
> using namespace ::boost::empty \
> /**/
>
> It doesn't introduce any names into the scope where it is used, and
> it can be used any number of times in the same scope. It can be
> used at namespace and function scope, though it is not necessary at
> function scope. It *can't* be used in class scope, but it isn't
> necessary there either.

 It turns out that, in some places where we've got heavy macro
 programming going on, this didn't work; I kept getting "expected
 nested-name-specifier before 'namespace' " sorts of errors. It turns
 out that

#define BOOST_SEMICOLON
  typedef int semicolon_allowed_after_this

 makes GCC 3.4 happier; I don't understand the grammar issues
 involved.

 ... just a report from the trenches. :-)

------------------------------------------------------------------------
Dave Steffen, Ph.D. On a paper submitted by a physicist colleague:
Software Engineer IV
Numerica Corporation "This isn't right. This isn't even wrong."
ph (970) 419-8343 x27
fax (970) 223-6797 -- Wolfgang Pauli
dgsteffen_at_[hidden]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk