Boost logo

Boost :

From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2005-05-05 12:13:07

Angus Leeming wrote:

> > FYI, Wave has a special #pragma usable for bridging this gap:
> >
> > #pragma wave system(any OS command)
> >
> > which spawns of the given command and intercepts the
> produced stdout
> > stream, inserting it instead of the pragma itself :-P. In
> C99 mode you
> > even may use it from the operator _Pragma and force a full macro
> > expansion of the inserted results:
> >
> > #define EVAL(x) x
> > EVAL(_Pragma("wave system(any OS command)"))
> >
> > Regards Hartmut
> Hartmut,
> is that a good idea? I can imagine that running an existing
> executable might cause untold damage to my system, but
> compiling a piece of source code?
> Doesn't it smack of C++ source code as computer virus?

Well, you still need to have the 'appropriate' executable to run to make it
into a virus.

And, BTW, this was a feature request for Wave during its development. But I
may include the corresponding code based on a preprocessor directive only,
so by default this wouldn't be compiled in ... :-P

Regards Hartmut

Boost list run by bdawes at, gregod at, cpdaniel at, john at