Boost logo

Boost Users :

From: Edward Diener (eddielee_at_[hidden])
Date: 2003-03-31 11:06:54


I am trying to understand how the MPL library works. I first read "The Boost
C++ Metaprogramming Library" by Aleksey Gurtovoy and David Abrahams. When I
get to Basic Usage I see this:

template<
      typename Condition
    , typename T1
    , typename T2
>
struct if_
{
    typedef /*unspecified*/ type;
};

I am really having trouble understanding the next to last line. How can
"typedef type;" be a valid C++ construct and, if it is, what does it mean ?
I always though that a typedef must specify an actual type but I don't see
any in the expression above.


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