struct assign_zero_to_tuple_member {
template <typename TupleT>
- static void do_(TupleT &t) { t[::phoenix::tuple_index<N>()] = 0; }
+ static void do_(TupleT &t)
+ {
+ ::phoenix::tuple_index<N> const idx;
+ t[idx] = 0;
+ }
};
template <int N>
// grammar.
BOOST_STATIC_ASSERT(N > 0 && N < tuple_t::length);
+ ::phoenix::tuple_index<N> const idx;
+
// If the following assertion is fired, you have probably forgot to call
// the start_parser() function from inside the constructor of your
// embedded definition class to initialize the start parsers to be exposed
// Another reason may be, that there is a count mismatch between
// the number of template parameters to the grammar_def<> class and the
// number of parameters used while calling start_parsers().
- BOOST_SPIRIT_ASSERT(0 != t[::phoenix::tuple_index<N>()]);
+ BOOST_SPIRIT_ASSERT(0 != t[idx]);
- return t[::phoenix::tuple_index<N>()];
+ return t[idx];
}
private: