Re: [Boost-users] result_of protocol
-----Original Message-----
From: "Hicham Mouline" [hicham@mouline.org] Date: 26/02/2010 09:40 AM To: boost-users@lists.boost.org Subject: Re: result_of protocol.
---------------------------------------------------------------------------------- struct extract_rule {
template <typename Sig> struct result;
template <typename Holder> struct result< extract_rule(const Holder) > { typedef const typename Holder::type& type; };
template <typename Holder> typename result< extract_rule(const Holder) >::type operator()( const Holder& h ) const { return h.rule; } }; ----------------------------------------------------------------------------------
1> with 1> [ 1> Sig=extract_rule (const onevariantrule
) 1> ]
The template onevariantrule<> is defined _before_ extract_rule.
------------------------------------------------------------------------------------------- template
struct onevariantrule { typedef .... type; }; -------------------------------------------------------------------------------------------
Holder matches onevariantrule
. That template instantiation is indeed a class.
In the snippet above, I replaced Holder by what the compiler tells me it is in the error log, as
------------------------------------------------------------
struct extract_rule {
template <typename Sig> struct result;
template <typename Holder>
struct result< extract_rule(const Holder) > {
typedef const onevariantrule
participants (1)
-
Hicham Mouline