Problems with the new concepts checking code (boost)

Peter Schmid schmid@snake.iap.physik.tu-darmstadt.de
Thu Apr 5 10:20:00 GMT 2001


Because of the new concepts checking code there are many regressions
running the boost repository regression test suite and I cannot use
some libraries when the concepts checking code is active.

Some problems are because of the #define
glibcpp_function_requires(...) boost::function_requires<
boost::__VA_ARGS__ >() puts the checking code in namespace boost, and
the new checking code employs macros beginning with BOOST_*, therefore
 name clashes result. There are compiler messages like

g++ -c -Wall -W -ftemplate-depth-30 -I.. ../libs/concept_check/concept_check_test.cpp
In file included from /usr/local/include/g++-v3/bits/std_iterator.h:35,
                 from /usr/local/include/g++-v3/iterator:2,
                 from ../boost/config.hpp:247,
                 from ../boost/concept_check.hpp:11,
                 from ../libs/concept_check/concept_check_test.cpp:7:
/usr/local/include/g++-v3/bits/stl_iterator_base_funcs.h: In function `void 
   std::__distance(_InputIterator, _InputIterator, _Distance&, 
   std::input_iterator_tag)':
/usr/local/include/g++-v3/bits/stl_iterator_base_funcs.h:54: parse error before 
   `::' token
/usr/local/include/g++-v3/bits/stl_iterator_base_funcs.h: In function `void 
   std::__distance(_RandomAccessIterator, _RandomAccessIterator, _Distance&, 
   std::random_access_iterator_tag)':
/usr/local/include/g++-v3/bits/stl_iterator_base_funcs.h:64: parse error before 
   `::' token

If I change the name of the namespace boost and the prefix of the
macro names in the g++ include files, some of the problems go away,
but still some new problems persist. 

When the checking code is explicity disabled there are four testsuite
failures:
integer_traits_test.cpp, random_test.cpp, random_demo.cpp:
all of these fail because of an ice in tree_low_cst, at tree.c:3424 of
the g++ compiler due to flawed support for the long long type.
The compilation of call_traits_test.cpp fails because of code that is
#ifdef'ed out for gcc-version < 3.  
These result are valid both for the disabled new and old checking code. 

If the old checking code is enabled, there are only two additional
failures because of requirement violations in: 
counting_iterator_test.cpp:
postincrement_operator_requirement_violation(_Iterator) 
iterator_traits_test.cpp: default_constructor_requirement_violation 

For the new checking code there are seven additional failures (I made
the modifications as indicated above, otherwise there are many more
regressions), the error messages are much more verbose (sometimes >
1000 lines) and the messages are less concise than the old messages
which have a prefix which clearer shows where the error occurs. 
As far as I can tell all the following rejections and error messages
are incorrect.   

function_test.cpp (95 lines error messages)
graph.cpp (5453 lines error messages)
regex_test.cpp (313 lines error messages and warnings)
wregex_test.cpp (392 lines error messages and warnings)
iterator_adaptor_test.cpp (590 lines error messages)
counting_iterator_test.cpp (6985 lines error messages)
indirect_iterator_test.cpp (355 lines error messages)

These results are for boost version 1.21.1 and gcc version 3.1
20010404 (experimental) on i686-pc-linux-gnu.

Could someone of the implementers please confirm my problems by
running the boost regression testsuite and fix, at least some, of the
mentioned problems. I apologize if I made a mistake in modification the
header files.

Hope this helps,
Peter Schmid



More information about the Libstdc++ mailing list