Public bug reported: Binary package hint: gcc-4.5
The following code will not compile: template <int i> struct LabelTypeMap { typedef int type_t; }; template <bool> struct Hold { typedef int type; }; template<typename Holder, template<typename Holder::type> class typeMap> struct Whatever { }; template <bool Enable> struct Now { typedef Whatever<Hold<Enable>, LabelTypeMap> concrete_t; }; int main() { Now<true>::concrete_t t; }; i get these errors: error: type/value mismatch at argument 2 in template parameter list for ‘template<class Holder, template<typename Holder::type <anonymous> > class typeMap> struct Whatever’ expected a template of type ‘template<typename Holder::type <anonymous> > class typeMap’, got ‘template<int i> struct LabelTypeMap’ Hint: if i replace this: template <bool Enable> struct Now { typedef Whatever<Hold<Enable>, LabelTypeMap> concrete_t; }; with this: template <bool Enable> struct Now { typedef Whatever<Hold<true>, LabelTypeMap> concrete_t; }; it builds just fine. tested versions: g++ (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 g++-4.5 (Ubuntu/Linaro 4.5.1-7ubuntu2) 4.5.1 Description: Ubuntu 10.10 Release: 10.10 ** Affects: gcc-4.5 (Ubuntu) Importance: Undecided Status: New -- [c++] weird conflict with template template parameter taking subtype of previous parameter as a non-type ordinal https://bugs.launchpad.net/bugs/682249 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs