$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] result_of protocol
From: Hicham Mouline (hicham_at_[hidden])
Date: 2010-02-26 04:40:25
Hello,
I get the following msvc2008 error:
error C2825: 'Holder': must be a class or namespace when followed by '::'
in the following code
----------------------------------------------------------------------------------
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<parameters_t,0,boost::spirit::istream_iterator> )
1> ]
The template onevariantrule<> is defined _before_ extract_rule.
-------------------------------------------------------------------------------------------
template <typename parameters_t, unsigned n, typename Iterator>
struct onevariantrule {
typedef .... type;
};
-------------------------------------------------------------------------------------------
Holder matches onevariantrule<parameters_t,0,boost::spirit::istream_iterator>.
That template instantiation is indeed a class.
It has the inner field called "type".
Any ideas would be appreciated,