metrowerks & vacpp

Hi, I need somebody, that can help me out with a problem with codewarior and/or vacpp. Regressions are failing on these compilers due to incorrect classification of std::string and std::list. It seems, that the template signature for classes differs from standatard ( std::list<T,Alloct> ) and so, the sequence_traits are not recognizing these classes. Please, if somebody have an access to these compilers, check the singnature of them, and send it on the list. There might be another porblem as well, but I cannot figure it out right now. Regards, Pavol

"Pavol Droba" <droba@topmail.sk> wrote in message news:20040312094216.GP14244@lenin.felcer.sk...
I checked the standard library which ships with Codewarrior 8.0 and 9.2 for Windows; list, vector, string (and all the other standard containers, as far as I can tell), have the standard template parameter lists. Which tests are failing? Jonathan

On Fri, Mar 12, 2004 at 03:10:23AM -0700, Jonathan Turkanis wrote:
algorithm/replace. Concretely the sequence classification there is failing. I wonder, what the problem could be? I though, that it is due to slightly different signature (like an additionale parameter). Thanks for help. Pavol

First of all, the std::string of VisualAge is compatible with the standard (It seems like vacpp uses the Dinkum library BTW). So why algorithm/string/replace fails is a mystery to me. I tried to understand the code to see what't wrong but I don't really grasp the details of the implementation. For instance, where is 'has_native_replace_tester' defined ? As a side remark, I wonder if declaring BOOST_STATIC_CONSTANT( bool, ... ) is legal C++. Paragraph 5.19.1 of the standard only talks about integral types and enums. However I did a small test like this ------------------- Class A { Public: BOOST_STATIC_CONSTANT(bool, value = 3 ) ; } ; Int main() { itn v = A::value ; std::cout << v << std::endl ; return ; } -------------------- And it compiles and gives the output '3' (although I would expect the boolean to int conversion to result in '1' instead of 3. But this is probably due to the 'enum-trick' in BOOST_STATIC_CONSTANT which might also be a cause for your test to fail. t

On Fri, Mar 12, 2004 at 11:55:22AM +0100, Toon Knapen wrote:
First of all, the std::string of VisualAge is compatible with the standard (It seems like vacpp uses the Dinkum library BTW).
I see.
Testers are defined in spearate headers, in boost/algorithm/string/stl directory. The reason for this it that there it a need to include the particular stl header before tester. So if a user chooses not to include whole stl, she can include only those testers that are needed. Implementation is using testers as a workaround for compilers without partial specialization. Current implementaion is no restrictive in any way, therefore it is used as a default even form more compliant compilers. This technique is called "Poor man's partial specialization"
Std 3.9.1.7 says, that bool is an integral type. But the problem can be related to enum workaround. However, the examble you have provided seems ok. Even if value==3, when used in a bool expression it should evaluate to "true". And that is only thing I need. Pavol.
participants (3)
-
Jonathan Turkanis
-
Pavol Droba
-
Toon Knapen