On 09.11.2012 11:26, "Ing.- Büro Austel" wrote:
using the free downloadable bcc55 compiler I get the error
../../../src/libCom/cxxTemplates/epicsOnce.cpp:
Error E2316 ../../../src/libCom/cxxTemplates/epicsSingleton.h 112:
'epicsSingleton<TYPE>::reference::operator =(const
epicsSingleton<TYPE>::reference &) is not a
member of 'epicsSingleton<TYPE>::reference'
***1 error in Compile ***
any idea ?
thanks in advance,
Jens
There are more C++ implementations in heaven and earth than are dreamt
of in your philosophy.
The same file epicsSingleton.h defines starting from line 46:
template < class TYPE >
class epicsSingleton {
public:
class reference {
public:
/*...*/
// this somewhat convoluted reference of the return
// type ref through the epicsSingleton template is
// required for the archaic Tornado gnu compiler
typename epicsSingleton < TYPE > :: reference &
operator = ( const reference & );
/*...*/
}
It seems the "archaic Tornado gnu compiler" and bcc55 don't quite agree
on what valid C++ template syntax looks like.
The syntax looks strange to me, too. I simplified it to:
reference & operator = ( const reference & );
And it compiles fine with several gcc versions for Linux and as well
with the gcc versions of vxWorks 5.5, 6.3 and 6.7. Maybe bcc is happy
with this change, too?
Can someone check with other compilers (e.g. clang, M$ cl)?
Dirk