Question about "cppunit" use

Sergey Vlasov vsu at altlinux.ru
Sat Nov 10 20:27:36 UTC 2012


On Sat, Nov 10, 2012 at 11:27:30AM -0800, Neil Hodge wrote:
> I am using the git/latest version on OS X 10.8, with the cmake command
> 
> cmake -DCMAKE_BUILD_TYPE=Release \
>      -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 \
>      -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" \
>      -DENABLE_STATIC=ON \
>      -DCMAKE_INSTALL_PREFIX="/Users/nhodge/bin/taglib-1.8_install" \
>      -DBUILD_EXAMPLES=ON \
>      -DBUILD_TESTS=ON
> 
> 
> When I run "make check", I get the error
> 
> In file included from /Users/nhodge/bin/taglib-latest/tests/test_mpeg.cpp:1:
> In file included from 
> /opt/local/include/cppunit/extensions/HelperMacros.h:9:
> In file included from /opt/local/include/cppunit/TestCaller.h:5:
> In file included from /opt/local/include/cppunit/TestCase.h:6:
> /opt/local/include/cppunit/TestAssert.h:49:12: error: call to function 
> 'operator<<' that is neither visible in the template definition nor 
> found by argument-dependent lookup
>          ost<< x;
>             ^

Please show subsequent messages - they actually explain why this error
happens in this particular case.

Most likely the code is not valid according to the C++ standard, but
accepted by older GCC versions - see this explanation in Clang docs:

  http://clang.llvm.org/compatibility.html#dep_lookup

The code will probably also break when compiling with GCC >= 4.7:

  http://gcc.gnu.org/gcc-4.7/porting_to.html

(see the "Name lookup changes" section - although they do not mention
the case with overloaded operators there).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20121111/6d04fed2/attachment.sig>


More information about the taglib-devel mailing list