|
Boost : |
From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2004-02-20 04:37:59
Victor A. Wagner, Jr. wrote:
> 1) I like the idea
> 2) I shouldn't do this (read tech emails when my blood sugar is low...
> my brain tends to wander and I come up with oddball ideas, to wit:)
Dunno what illness I suffer from, but what about:
// Header "boost/mpl/has_"
#ifndef HAS_HPP
#define HAS_HPP
#include <boost/mpl/aux_/has_xxx.hpp>
#endif
BOOST_MPL_HAS_XXX_TRAIT_DEF
// Use:
#include <boost/mpl/has_>
( Test )
// Replaces:
#include <boost/mpl/aux_/has_xxx.hpp>
BOOST_MPL_HAS_XXX_TRAIT_DEF( Test )
OTOH, some quick test shows that my compiler doesn't like it, as the
last line of the include file plus the following line are not recognised
as a macro call. Don't know if it's legal to do such stuff...
If you'd like to change the language for more convenience, I suggest
another syntax:
#include <boost/mpl/has_>( Test )
The required change could be quite minimal: #include "bla" or #include
<blubb> should accept code (or whatever) after the closing " or > and
just replace the part before that with the include file's content.
OK, time for a coffee and sorry if this was a stupid idea :)
Regards, Daniel
-- Daniel Frey aixigo AG - financial solutions & technology Schloß-Rahe-Straße 15, 52072 Aachen, Germany fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99 eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk