Boost logo

Boost :

Subject: Re: [boost] decltype and incomplete types
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-04-08 16:52:16


AMDG

Daniel Walker wrote:
> True. I only meant to show that there are circumstance where
> successful overload resolution may require a complete type. Here's
> another example that doesn't use function arguments. One could imagine
> a scenario such as
>
> template<class T>
> typename boost::enable_if<
> boost::is_pod<T>, T
>
>> ::type foo();
>>
>
> template<class T>
> typename boost::disable_if<
> boost::is_pod<T>, int
>
>> ::type foo();
>>
>
> Here the type of the expression foo<S>() cannot be determined if S is
> incomplete.
>

Again this isn't *because* S is the return type. It's
because it's passed to a template that requires a
complete type.

In Christ,
Steven Watanabe


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