|
Boost Users : |
From: Joel de Guzman (djowel_at_[hidden])
Date: 2003-03-31 18:43:17
Edward Diener wrote:
> David Abrahams wrote:
>> "Edward Diener" <eddielee_at_[hidden]> writes:
>> There's an unspecified type-expression which goes where the
>> /*unspecified*/ comment is.
>>
>>> I always though that a typedef must specify an actual type but I
>>> don't see any in the expression above.
>>
>> The point is that we're not showing it to you ;-)
>
> I suspected that but I couldn't figure out why you wouldn't show it.
> However it made it hard for me to understand how mpl::if_<> really
> works without understanding what actually goes there.
Because it's an implementation detail :-) You need not know
the guts of how if_ really works, as long as it works. The same
way as you don't need to know how if (c) a; else b; works,
(in terms of low level code) as long as it works.
However, perhaps the /*unspecified*/ would better be enhanced
by pseudo-code?
template<
typename Condition
, typename T1
, typename T2
>
struct if_
{
/* if (Condition) T1 else T2 */
typedef /* implementation detail */ type;
};
Thoughts? Dave? Aleksey?
-- Joel de Guzman joel at boost-consulting.com http://www.boost-consulting.com http://spirit.sf.net
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net