------- Comment #1 from igodard at pacbell dot net  2008-07-29 00:52 -------
Oops - sorry, posted wrong test case:
enum A{a};
enum B{b};
enum C{c};
enum D{d};
class bottom {};

template<typename E> class attr {
public:  E v;
    operator E() { return v;}
    };

template<template<typename> class node, typename attr, typename next>
class       attrNode : public node<attr>, public next {};

template<template<typename> class node>
class list1 : public
    attrNode<node, A,
    attrNode<node, B,
        bottom > > {};

class   foo : public list1<attr> {};

list1<attr> v1;
foo         v2;

template<typename E, template<typename>class node,
    template<template<typename> class> class nodeList >
    node<E>&        att(nodeList<node>& v) { return v; }

int main() {
    A x1 = att<A>(v1);
    B x2 = att<B>(v1);
    A x3 = att<A>(v2);
    }

gets you:
~/ootbc/personal/ivan$ g++ foo.cc
foo.cc: In function ‘int main()’:
foo.cc:33: error: no matching function for call to ‘att(foo&)’


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36961

Reply via email to