|
Boost : |
From: Daniel Heck (dheck_at_[hidden])
Date: 2000-05-04 07:34:22
On Thu, 4 May 2000, Paul A. Bristow wrote:
> This looks useful but alas won't compile with MSVC++ 6 Sp3 (the latest
> version)
>
> (I added a return 0; to end main and a using namespace std; though my
> experience is that using std::string; etc is MUCH better).
>
> I suspect the problem is minor but I can't immediately see what is wrong.
>
> Line causing offence is
>
> if ((beg->longopt).compare(val, 0, s) == 0)
I wrote the program under Linux; it seems the STL that comes with gcc is
not fully standard compliant.
For some strange reason, the STL implementation that comes with gcc
2.95 uses
basic_string<>::compare(basic_string<>&, size_type, size_type)
whereas the standard implements this as
basic_string<>::compare(size_type, size_type, basic_string<>&)
This is something I already stumbled over when programming my argp
class; It seems I should _really_ consider an update ;)
Anyway, you are right; The quoted line should really be
if ((beg->longopt).compare(0, s, val) == 0)
Hope this helps
Daniel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk