Boost logo

Boost :

From: nitin motgi (nitin.motgi_at_[hidden])
Date: 2006-01-19 14:02:02


 Hi Asgar,

I was compiling pimpl test on Cygwin with g++ 3.4.4 and was failing
due to some compiler errors. I fixed and thought you should also know
it before getting into review. Please let me know if you need any help.

Attached is the diff file.

$ g++ -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose
--prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-languages=c,ada,c++,d,f77,java,objc --enable-nls
--without-included-gettext --enable-version-specific-runtime-libs
--without-x --enable-libgcj --disable-java-awt --with-system-zlib
--enable-interpreter --disable-libgcj-debug --enable-threads=posix
--enable-java-gc=boehm --disable-win32-registry --enable-sjlj-exceptions
--enable-hash-synchronization --enable-libstdcxx-debug : (reconfigured)
Thread model: posix gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd
0.125)

1. First of all the pimpl_ptr.hpp is in the wrong directory.
    Possible location I think would be best is
BOOST_ROOT/boost/pimpl_ptr.hpp

2. Some character at 27:7 in test/pimpl_ptr_test.h causes a compiler
problem.
3. With 3.4.4 GCC dependent name lookup cause the problem because of which
    the base class variable you have defined m_pImpl is not reachable from
derived
    class for policies. I modified it to this->m_pImpl everywhere in the
derived classes
    and was able to compile. You can also qualify it completely.

4. And in the pimpl_ptr the same problem exists with get() function which
should
    be calling the policy function. They are also subjected to two stage
lookup causing
    compiler error. I has had to fix it by adding this-> in the beginning.

 5. For the above points you need to possibly make necessary changes to
accomodate compilers
    that do not have / or implement two-stage name lookup correctly.

Thank you,

--
Nitin Motgi
NITIN . DOT. MOTGI .AT. GMAIL .DOT. COM



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk