1 Apr 2003 01:43
Re: Re: Understanding MPL
Joel de Guzman <djowel <at> gmx.co.uk>
2003-03-31 23:43:17 GMT
2003-03-31 23:43:17 GMT
Edward Diener wrote: > David Abrahams wrote: >> "Edward Diener" <eddielee <at> tropicsoft.com> 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(Continue reading)> > 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_
>
> 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_
RSS Feed