10 Oct
2011
10 Oct
'11
1:45 p.m.
Every type in the sequence has the following form:
struct sequence_item { typedef the_real_type type ; static the_real_type *parse( const QDomElement & ) ; } ;
The code for iterating over the sequence is the following:
template < typename It, typename End > ?? *dispatchM( const QDomElement &, mpl::true_ /* endofvec */ ) { return 0 ; }
template < typename It, typename End > ?? *dispatchM( const QDomElement &element, mpl::false_ ) { typedef typename mpl::deref< It >::type MapEntry ; if ( element.tagName() == MapEntry::first::name() )
The above line means that you figure out the correct type in *run-time*, don't you? But the result type must be known in compile-time.