compiling x and error in y templated inheritance
I've a class paramsMapCore
Code:
template <typename KeyType, typename ValueType>
class paramsMapCore : public std::map<KeyType, ValueType>{
...
}
and another Class paramsMap
Code:
class paramsMap : public paramsMapCore<string, Var>{
...
}
All these Classes compiles and works nice.
I just another Class Js::Object
Which is in Js namespace.
Code:
class Object: public Js::JVar, public paramsMapCore<string, Js::JVar>{
...
}
when it compiles object.cpp it doesn't fires any error on object.cpp or object.h
but it shows some error comming from paramsmap.h and paramsmap.hpp
wondering cause If I remove the Js::Object class everything including the paramsMap and paramsMapCore works fine.
This is the error message
Code:
compiling object.cpp (g++)
cgi++/paramsmap.h:36: error: expected template-name before '<' token
cgi++/paramsmap.h:36: error: expected `{' before '<' token
cgi++/paramsmap.h:36: error: expected unqualified-id before '<' token
cgi++/object.cpp:34: instantiated from here
cgi++/paramsmapcore.hpp:38: error: conversion from 'Var' to non-scalar type 'Js::JVar' requested
and another thing that makes me pull my hair is I've included paramsmapcore.h from object.h but I've never included paramsmap.h from object.h so why its bothering about paramsmap.h
Not getting any clue to solve plese help