Post, Mark K wrote:

 >
 > In file included from /usr/include/c++/3.2/string:57,
 >                  from LVCSim_liveCacheSink.cpp:60:
 > /usr/include/c++/3.2/bits/basic_string.tcc: In member function
 >    `_Alloc::size_type std::basic_string<_CharT, _Traits,
 > _Alloc>::rfind(const _CharT*, _Alloc::size_type, _Alloc::size_type) const':
 > /usr/include/c++/3.2/bits/basic_string.tcc:713: parse error before `(' token
 >
 > The line at 713 is this:
 >       __pos = std::min(__size - __n, __pos);

I had a closer look at this, and although I haven't done c++ for a few years,
I think the problem is the fact that "min" is probably a macro, and not
part of namespace "std". The statement resolves to :

__pos = std::( ( (__size - __n) <= (__pos) ) ? (__size - __n) : (__pos) );

which certainly won't work. I changed the line to say :

__pos = min(__size - __n, __pos);

which compiles fine (optimization off to avoid problem with livecache.h).

Now who does this problem really belong to ? the gcc guys ?


/Per



-- 
regards,
Per Jessen, Zurich
http://www.enidan.com - home of the J1 serial console.

Windows 2001: "I'm sorry Dave ...  I'm afraid I can't do that."

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to