Boost logo

Boost :

From: helmut.zeisel_at_[hidden]
Date: 2001-10-31 09:59:42


--- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:

>
> This minimal example:
>
> template<class T> void f(T = 0);
> template<> void f(int = 0);
>
> is not accepted by the online Comeau:
>
> "11110.c", line 2: error: default argument is not allowed
> template<> void f(int = 0);
> ^

Is this just because the standard say it that way,
or is there any other reason for that?

>
> The best workaround is to remove BOOST_EXPLICIT_TARGET from cast.hpp
> altogether.

So I should ask the author of the library (Kevlin Henney)
to do that?

>
> BOOST_EXPLICIT_TARGET-type workarounds are only needed when the
template
> parameter is not referenced at all, even in the return type.
>

Thanks for that information; I did not know that yet.

Helmut


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