A
Alex Vinokur
=========================
Windows 2000 Professional
Digital Mars C/C++ 8.36
STLport 4.5.3
=========================
I have got a problem with compilation of the following piece of code
using Digital Mars C/C++ compiler.
There was no problem with this code while using GNU g++ 3.2.
What is wrong?
====== C++ code : BEGIN ======
------ bar.h file : Fragment ------
class Foo
{
[---omitted---]
public :
bool foo (const Foo* const) const;
[---omitted---]
}
-----------------------------------
------ bar.cpp file : Fragment ------
[---omitted---]
mem_fun(&Foo::foo); // Line#255
[---omitted---]
-------------------------------------
====== C++ code : END ========
====== Compilation : BEGIN ======
$ sc -I. -I\dm\stlport\stlport -c bar.cpp
mem_fun(&Foo::foo);
bar.cpp(255) : Error: need explicit cast for function parameter 1 to get
from: bool ( Foo::*member func)(const Foo*const )const
to : bool ( Foo::*member func)(const Foo*)const
mem_fun(&Foo::foo),
====== Compilation : END ========
=====================================
Alex Vinokur
mailto:[email protected]
http://mathforum.org/library/view/10978.html
=====================================
Windows 2000 Professional
Digital Mars C/C++ 8.36
STLport 4.5.3
=========================
I have got a problem with compilation of the following piece of code
using Digital Mars C/C++ compiler.
There was no problem with this code while using GNU g++ 3.2.
What is wrong?
====== C++ code : BEGIN ======
------ bar.h file : Fragment ------
class Foo
{
[---omitted---]
public :
bool foo (const Foo* const) const;
[---omitted---]
}
-----------------------------------
------ bar.cpp file : Fragment ------
[---omitted---]
mem_fun(&Foo::foo); // Line#255
[---omitted---]
-------------------------------------
====== C++ code : END ========
====== Compilation : BEGIN ======
$ sc -I. -I\dm\stlport\stlport -c bar.cpp
mem_fun(&Foo::foo);
bar.cpp(255) : Error: need explicit cast for function parameter 1 to get
from: bool ( Foo::*member func)(const Foo*const )const
to : bool ( Foo::*member func)(const Foo*)const
mem_fun(&Foo::foo),
====== Compilation : END ========
=====================================
Alex Vinokur
mailto:[email protected]
http://mathforum.org/library/view/10978.html
=====================================