www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - templates: illigal operand types

reply "Robert M. Münch" <robert.muench robertmuench.de> writes:
Hi, while still trying to compile my dtsearch stuff I get:

d:\develop\dtsearch\include\darray.h(185) : Error: illegal operand types
Had: CUserThesaurusItem
and: CUserThesaurusItem
d:\develop\dtsearch\include\darray.h(249) : Error: illegal operand types
Had: CUserThesaurusItem
and: const CUserThesaurusItem
d:\develop\dtsearch\include\darray.h(289) : Error: illegal operand types
Had: CUserThesaurusItem
and: const CUserThesaurusItem
d:\develop\dtsearch\include\darray.h(185) : Error: illegal operand types
Had: CXmlSearchResultsItem
and: CXmlSearchResultsItem
d:\develop\dtsearch\include\darray.h(249) : Error: illegal operand types

Well, for the first error I don't understand what the problem is: both types
are the same...

--
Robert M. Münch
IT & Management Freelancer
Mobile: +49 (0)177 2452 802
Fax   : +49 (0)721 8408 9112
Web   : http://www.robertmuench.de
Aug 03 2002
next sibling parent reply user domain.invalid writes:
Robert M. Münch wrote:
 Hi, while still trying to compile my dtsearch stuff I get:
 
 d:\develop\dtsearch\include\darray.h(185) : Error: illegal operand types
 Had: CUserThesaurusItem
 and: CUserThesaurusItem
 d:\develop\dtsearch\include\darray.h(249) : Error: illegal operand types
 Had: CUserThesaurusItem
 and: const CUserThesaurusItem
 d:\develop\dtsearch\include\darray.h(289) : Error: illegal operand types
 Had: CUserThesaurusItem
 and: const CUserThesaurusItem
 d:\develop\dtsearch\include\darray.h(185) : Error: illegal operand types
 Had: CXmlSearchResultsItem
 and: CXmlSearchResultsItem
 d:\develop\dtsearch\include\darray.h(249) : Error: illegal operand types
 
 Well, for the first error I don't understand what the problem is: both types
 are the same...
This is not necessarily true: ... vector <int> a; vector <int> b; ... a and b are distinct types to make them the same types: ... typedef vector <int> int_vector; int_vector a; int_vector b; ...
 
 --
 Robert M. Münch
 IT & Management Freelancer
 Mobile: +49 (0)177 2452 802
 Fax   : +49 (0)721 8408 9112
 Web   : http://www.robertmuench.de
 
 
 
Aug 03 2002
parent reply "Robert M. Münch" <robert.muench robertmuench.de> writes:
<user domain.invalid> schrieb im Newsbeitrag
news:aigihq$2chv$1 digitaldaemon.com...

 This is not necessarily true:
 ...
   vector <int>  a;
   vector <int>  b;
 ...

 a and b are distinct types
Hi, really? Why this? I thought template instantiation for basic types will only be done once, so using vector<int> serveral times will only instantiate one vector<int> implementation type. Why are these two declarations are of distinct type? Robert
Aug 04 2002
parent user domain.invalid writes:
Robert M. Münch wrote:
 <user domain.invalid> schrieb im Newsbeitrag
 news:aigihq$2chv$1 digitaldaemon.com...
 
 
This is not necessarily true:
...
  vector <int>  a;
  vector <int>  b;
...

a and b are distinct types
Hi, really? Why this? I thought template instantiation for basic types will only be done once, so using vector<int> serveral times will only instantiate one vector<int> implementation type.
That's right as far is I know. Why are these two declarations are of
 distinct type? Robert
 
 
Ignore me, I don't know what I was smoking when I wrote this.
Aug 05 2002
prev sibling parent "Walter" <walter digitalmars.com> writes:
That can happen if the compiler can't find an operator overload that fits
the argument types you have.

"Robert M. Münch" <robert.muench robertmuench.de> wrote in message
news:aighsg$2bls$1 digitaldaemon.com...
 Well, for the first error I don't understand what the problem is: both
types
 are the same...
Aug 04 2002