|
Boost : |
From: Alisdair Meredith (alisdair.meredith_at_[hidden])
Date: 2005-06-06 05:49:54
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>
In general, it is easier just to include the necessary header though.
[This is one reason <iosfwd> exists in the standard]
AlisdairM
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk