www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

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

↑ ↓ ← "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
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
↑ ↓ "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
↑ ↓ → 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
→ "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

 are the same...

Aug 04 2002