From: Stefan S. <se...@sy...> - 2005-10-19 18:13:12
|
Hi Gilles, Gilles J. Seguin wrote: > after applying patch for bits/cpp_type_traits.h known problem > > "make check" fails > 1- /usr/include/c++/4.0.1/bits/stl_algobase.h:164 > 2- /usr/include/c++/4.0.1/ext/mt_allocator.h:498 > 3- /usr/include/c++/4.0.1/ext/mt_allocator.h:544 > > 1- is > std::__iter_swap< > __are_same<_ValueType1, _ValueType2>::__value > && __are_same<_ValueType1 &, _ReferenceType1>::__value > && __are_same<_ValueType2 &, _ReferenceType2>::__value > >::iter_swap(__a, __b); > > 2- is > const static size_t __align = ( > __alignof__(_Tp) >= sizeof(_Block_record) > ? __alignof__(_Tp) > : sizeof(_Block_record) > ); > > 3- is > const static size_t __align = ( > __alignof__(_Tp) >= sizeof(_Block_record) > ? __alignof__(_Tp) > : sizeof(_Block_record) > ); > You didn't say what exactly fails, so I guess it is the occ parser. Could you paste the actual error message(s) ? The first failed code looks suspiciously like code I had trouble with, too, as a compliant parser has to figure out that '__are_same' is a template-name in order to parse the following tokens as a template-id. It could well be that occ's heuristics start to fail here. I'm not sure what the problem with 2 and 3 is though. As long as 'sizeof' and '__alignof__' are recognized by the lexer this should be fine. (The second is actually a GCC extension, I believe.) Regards, Stefan PS: The actual code that I tried to parse before realizing it was time for a complete parser rewrite was this, FWIW: typedef typename ITE_Type<FixedDim == 0, ITE_Type<Dim1 < Dim2, As_type<row2_type>, As_type<col2_type> >, ITE_Type<FixedDim == 1, ITE_Type<Dim0 < Dim2, As_type<row2_type>, As_type<col2_type> >, ITE_Type<Dim0 < Dim1, As_type<row2_type>, As_type<col2_type> > > >::type type; |