Opened 16 years ago

Closed 15 years ago

Last modified 12 years ago

#799 new Feature Requests (invalid)

mpl::if_ — at Version 1

Reported by: nobody Owned by: nobody
Milestone: Boost 1.46.0 Component: mpl
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc: joel.falcou@…

Description (last modified by Dave Abrahams)

There is an alternative implementation of mpl::if.
This implementation makes code clearer.

We can write:
typename if_
<
  X,
  Y
>
::else_if
<
  Z,
  U
>
::else_
<
  V
>::type

The implementation can be found here:
http://cbear.berlios.de/meta/if.hpp

Change History (1)

comment:1 by Dave Abrahams, 15 years ago

Description: modified (diff)
Resolution: Noneinvalid
Severity: Showstopper
Status: assignedclosed

I disagree; it's far too verbose, and thus less clear, when you consider the need for the template keyword, which you left out.

  typename if_
  <
    X,
    Y
  >
  ::template else_if
  <
    Z,
    U
  >
  ::template else_
  <
    V
  >::type
Note: See TracTickets for help on using tickets.