Re: [Boost-bugs] [Boost C++ Libraries] #7730: Generic specializations of is_nullary for custom terminals are not possible

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7730: Generic specializations of is_nullary for custom terminals are not possible
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-02-04 00:10:58


#7730: Generic specializations of is_nullary for custom terminals are not possible
-------------------------------+---------------------
  Reporter: andysem | Owner: theller
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: phoenix
   Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+---------------------

Comment (by John Fletcher <J.P.Fletcher@…>):

 Replying to [ticket:7730 andysem]:
>
> The is_nullary trait has a second template parameter which is intended
 to be used exactly for this purpose. A nested tag void typedef can be used
 to match the trait for a set of types. I could create the following
 specialization:
>
> {{{
> template <typename T>
> struct is_nullary<custom_terminal<T>, typename T::_is_my_terminal >
> : mpl::false_
> {};
> }}}
>

 Note: I have not implemented this part of your example because as I read
 it this part will go into your client code. Is that correct?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7730#comment:2>
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:50:15 UTC