Loki's tricky templates

Kriang Lerdsuwanakij lerdsuwa@users.sourceforge.net
Sat Apr 21 07:27:00 GMT 2001


Paolo Carlini wrote:

>Yes, I agree that most probably it is valid. But Gcc don't like the 
>association
>of template-templates *and* the VisitorBinder pattern.
>It is amazing how many weird template tricks Andrei has developed!
>
>If someone else, more into template-template parameters will agree with us, I
>may file a GNATS PR and then begin investigating a couple of other problems in
>the Loki headers.

Hi

Your code relies on a template template parameter feature (template
template argument which scope is template parameter dependent) that
has not been implemented in gcc yet.  It was missing from the C++
standard as the language grammar doesn't allow it.  This now appears
as an issue in the C++ standard committee.  The correct version
of problematic code is shown below.

template <typename R, class TList>
class CyclicVisitor
     : public GenScatterHierarchy<TList, VisitorBinder<R>::template Result>
                                                                             ^^^^^^^
                                                                         keyword 
required

--Kriang



More information about the Gcc mailing list