Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-04-17 19:28:46


Joel de Guzman wrote:
> Michael Marcin wrote:
>> Or maybe I still don't understand. Are these forward declaration partial
>> specializations strictly necessary?
>
> Yes. It's a means to prevent unwanted ODR violation. Fusion is modular.
> The support for boost::array comes when you include a header. Imagine
> a case where a TU does not include the header and another that does.
> Without the forward declaration, the second TU will pick up the
> default (non-specialized) implementation, which might or might not
> compile, but will certainly be a violation of ODR.

Agreed. But we certainly need workarounds for compilers that can't
handle an incomplete partial specialization. On head, xpressive doesn't
compile on cw-9.4 because of this problem, and that's a regression from
1.34.

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

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