Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2006-06-09 09:07:02

Thorsten Ottosen wrote:
> Pavol Droba wrote:
>> On Thu, Jun 08, 2006 at 06:22:22AM -0700, Jeff Garland wrote:
>>> /home/jeff/devTools/boost_rc_1_34/boost/range/const_iterator.hpp:37:
>>> error: ???const char*??? is not a class, struct, or union type
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> Ok, that was just a guess. I'll have a look. But it might help if Thorsten
>> would check it out as well.
> The line in quetion reads
> template< typename C >
> struct range_const_iterator
> {
> typedef BOOST_DEDUCED_TYPENAME C::const_iterator type;
> But why isn't
> template<>
> struct range_const_iterator< const char* >
> {
> typedef const char* type;
> };
> picked up?
> I don't have any good idea why this is.
> I can build the library just fine with
> gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
> Does this simple test work on your compiler:
> typedef boost::range_const_iterator<const char*>::type foo = "foo";
> ?

No it doesn't:
  g++-4.0 -I /home/jeff/devTools/old_boost_rc_1_34/ test.cpp
In instantiation of ‘boost::range_const_iterator<const char*>’:
    test.cpp:8: instantiated from here
error: ‘const char*’ is not a class, struct, or union type

> I have to say, I hate that there is soo many versions of GCC flying around.

Actually, for me at least, it's pretty much independent of the gcc
version. Both these compilers fail in the same fashion on the above test:

  g++-4.0 -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default
--enable-mpfr --disable-werror --enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)

  g++-3.4 -v
Reading specs from /usr/lib/gcc/x86_64-linux-gnu/3.4.6/specs
Configured with: ../src/configure -v --enable-languages=c,c++,f77,pascal
--prefix=/usr --libexecdir=/usr/lib
--with-gxx-include-dir=/usr/include/c++/3.4 --enable-shared
--with-system-zlib --enable-nls --without-included-gettext
--program-suffix=-3.4 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug x86_64-linux-gnu
Thread model: posix
gcc version 3.4.6 (Ubuntu 3.4.6-1ubuntu2)

I'm actually trying to do a completely new checkout of the release
candidate branch now -- just to make sure something hasn't gone crazy
there. Unfortunately, cvs isn't cooperating with me at the moment. I
still can't quite see why the regression test isn't seeing this other
than perhaps a whole bank of Martin Wille's Linux compilers hasn't run
since last Friday. Oddly the 64bit Linux, which is where this is
failing is passing just fine.


Boost list run by bdawes at, gregod at, cpdaniel at, john at