Michael Schmitt <[EMAIL PROTECTED]> writes:
| Well, the big question is: Does ANSI C++ interpret "signed int" and
| "unsigned int" as different data types when used in a template such as
| pair? I think the question whether Sun CC is faulty or all other
| compilers are just a little bit to generous can only be decided if
| someone looks into the official ANSI C++ standard.
| Unfortunately, I do
| not have access to it and all C++ books available are simply too vague
| to decide this question.
No, but I do have access to it, and as I have told you already Sun CC
is missing a template constructor in pair.
Sun CC 5.0 is probably missing some language features: template
methods.
| I solved the problem by applying a static_cast. E.g.
|
| return make_pair(true, static_cast<unsigned>(LYX_DUMMY_LAYOUT));
|
| Even if a compiler does not care about whether LYX_DUMMY_LAYOUT is
| signed or unsigned, it should swallow the statement above, shouldn't it?
| Alternative, you may change the definition of make_pair.
make_pair is a template function provided by the C++ library.
This can also be solved by making LYX_DUMMY_LAYOUT be an unsigned
interger. Hopefully that will not open a can of worms.
| standard header files. Obviously, they do not dare to change them. At
| the moment, I do not intend to test CC 6.0 because then I will be
| confronted with even more beta testing (I think my boss would prefer if
| I finish my Ph.D. thesis; of course written with LyX :-)
:-)
Lgb