Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-07-10 00:04:11


I think it would be a mistake to try to write code which nobody can test ;)

...especially if it makes our code uglier

-Dave
----- 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?
>
> --
>
>
>
> ------------------------------------------------------------------------
> Life's too short to send boring email. Let SuperSig come to the rescue.
> http://click.egroups.com/1/6137/4/_/9351/_/963203348/
> ------------------------------------------------------------------------
>
>


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