[omniORB] CORBA.h and std::min collision in VC++ 7.1

Dominguez, Jose Luis jose-luis.dominguez at hp.com
Tue Mar 13 11:23:06 GMT 2007


try using namespace std instead of std::

________________________________

From: omniorb-list-bounces at omniorb-support.com
[mailto:omniorb-list-bounces at omniorb-support.com] On Behalf Of Stefan
Wegele
Sent: martes, 13 de marzo de 2007 10:03
To: omniorb-list at omniorb-support.com
Subject: [omniORB] CORBA.h and std::min collision in VC++ 7.1


Hello,
 
I have a problem using std::min and a corba object in the same file.
Here is the example:
 
#include <iostream>
#include <omniORB4/CORBA.h>
int main(int argc, _TCHAR* argv[])
{
      long a=23, b=345;
      long c = std::min(a, b);
      std::cout << c << std::endl;
      return 0;
}
 
I get:
error C2589: '(' : illegal token on right side of '::'
error C2059: syntax error : '::'
for the line with std::min.
If I remove the include of Corba.h then it works perfectly.
 
I declared: __WIN32__,__x86__,_WIN32_WINNT=0x0400, __NT__ and
__OSVERSION__=4
VC++ version: 7.1.6
 
Thanks, Stefan
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070313/6ec8a596/attachment.htm


More information about the omniORB-list mailing list