Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-06-06 06:13:07


Alisdair Meredith wrote:

> Vladimir Prus wrote:
>
>> Isn't it technically possible to forward-declared basic_string and
>> specialize on that? I can't find anything in the standard to prohibit
>> specializing on incomplete type. And restriction on putting
>> declarations to "namespace std" is not enforced.
>
> Not portable, as the library implementer is free to add additional
> template parameters, so long as they have default values.
>
> Of course if you know exactly which implementation you are dealing
> with, you can arrange the correct fwd-declaration <g>

We're talking about very specific case -- VC 7.0, so extact fwd-declaration
is possible.

> In general, it is easier just to include the necessary header though.
>
> [This is one reason <iosfwd> exists in the standard]

Alas, there's no <stringfwd>

- Volodya


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