|
Boost : |
From: Daryle Walker (darylew_at_[hidden])
Date: 2001-10-22 13:16:44
Supposedly, some compilers (Comeau?) are going to support "export" soon.
Maybe we could support it like this:
* Use a BOOST_NO_EXPORT config macro for compilers that can't support
"export". This is currently every compiler, but we can't use the reverse
test since "export" is supposed to be standard.
* Consider going to a centralized mandatory-source directory, to ease
using "export" headers. Let's call this directory $BOOST_ROOT/boost_src.
If a compiler doesn't support "export", a header could end with:
#ifndef BOOST_NO_EXPORT
#include <boost_src/crc.cpp>
#endif
otherwise, the user has to include the *.cpp file in the project makefile
like regular non-template source files. Having a centralized directory is
better than having to pick out directories all over the "libs" hierarchy.
* Compilers that don't support "export" may not even handle the word
showing up in a declaration or definition. Maybe we should do something
like BOOST_NESTED_TEMPLATE to safely mark declarations:
#ifndef BOOST_NO_EXPORT
#define BOOST_DECLARE_EXPORT export
#else
#define BOOST_DECLARE_EXPORT
#endif
* The latest release of Spirit (1.2.1) is an example of where the *.ipp
files could transition to this new model. The existing mandatory source
files could transition to this model too.
Thoughts?
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT mac DOT com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk