Re: [Boost-bugs] [Boost C++ Libraries] #799: mpl::if_

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #799: mpl::if_
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-07-06 01:50:54


#799: mpl::if_
-------------------------------+--------------------------------------------
  Reporter: nobody | Owner: nobody
      Type: Feature Requests | Status: closed
 Milestone: | Component: None
   Version: None | Severity: Showstopper
Resolution: invalid | Keywords:
-------------------------------+--------------------------------------------
Changes (by dave):

  * status: assigned => closed
  * resolution: None => invalid
  * severity: => Showstopper

Old description:

> {{{
> 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
> }}}

New description:

 {{{
 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
 }}}

Comment:

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

 {{{
 #!cpp
   typename if_
   <
     X,
     Y
>
   ::template else_if
   <
     Z,
     U
>
   ::template else_
   <
     V
>::type

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/799#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC