Boost logo

Boost :

From: Valentin Bonnard (Bonnard.V_at_[hidden])
Date: 2000-07-21 14:10:38


David Abrahams wrote:

> I think it would be a mistake to try to write code which nobody can test ;)
>
> ...especially if it makes our code uglier

...especially when it's never semantically necessary

> ----- Original Message -----
> From: "Daryle Walker" <darylew_at_[hidden]>
> To: "Boost" <boost_at_[hidden]>
> Sent: Monday, July 10, 2000 12:28 AM
> Subject: [boost] Using "export" in Boost, compile flag
>
> > C++ has a keyword "export," which lets you place templates outside header
> > files into source code. Unfortunately, no compiler I know of supports it.
> > They should someday, and maybe Boost should take it into account. We
> could
> > move any template function with a large (i.e. wouldn't be inlined)
> > implementation to a *.cpp file, and connect it to its header with
> "export."
> > I'm not sure if "export" is required, or which version (header's
> declaration
> > or source's definition) gets the "export" mark. Like other features of
> C++
> > that may be missing on some compilers, we could add a pre-processor flag
> in
> > config.hpp to warn about missing export-support. The flag could allow the
> > *.cpp file to be included in the *.hpp file if it's true. There are at
> > least two potential problems:
> >
> > 1. Since there is no known (AFAIK) implementation of "export," and that
> the
> > config.hpp flags are written for compilers missing support instead of ones
> > with support of a feature, conceivably every compiler we know of has to be
> > added, leading to a long list.
> >
> > 2. Some compilers without support (like the version of CodeWarrior I
> have)
> > 'protect' the user by parsing the "export," but then reporting that
> exported
> > templates aren't supported and ending the compile. This means that we
> can't
> > even safely stick the "export" in front of a declaration. We would have
> to
> > use macro magic for the declarations too, yuck!
> >
> > Opinions?

-- 
Valentin Bonnard

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