Opened 11 years ago

Last modified 8 years ago

#6142 new Bugs

boost::mpl/has_xxx.hpp gives several errors

Reported by: Ivo Raisr <ivosh@…> Owned by: Aleksey Gurtovoy
Milestone: Boost 1.49.0 Component: mpl
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc: driscoll@…, bb51@…

Description

when using boost 1.47.0 with gcc 4.1.2 and -Wundef -Werror, it gives the following errors

boost/mpl/has_xxx.hpp:344:9: error: "BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION" is not defined
boost/mpl/has_xxx.hpp:357:9: error: "BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES" is not defined
mpl/has_xxx.hpp:386:9: error: "BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION" is not defined
boost/mpl/has_xxx.hpp:459:8: error: "BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE" is not defined

This problem has been already addressed by bug report 4666, but apparently its part for MPL has been forgotten. Therefore I would like to resurrect this problem again.

Either the logic of defining these four #define's needs to be revisited in the header file, or their usage must be rewritten to check whether the #define is defined at all. For the latter case, I'm attaching a patch.

Should you need more information, just ping me. Ivo Raisr

Attachments (1)

boost-has_xxx-defines.patch (1.5 KB ) - added by Ivo Raisr <ivosh@…> 11 years ago.

Download all attachments as: .zip

Change History (7)

by Ivo Raisr <ivosh@…>, 11 years ago

Attachment: boost-has_xxx-defines.patch added

comment:1 by driscoll@…, 11 years ago

Cc: driscoll@… added

comment:2 by Ben Brian <bb51@…>, 11 years ago

Problem also exists for me on OS X Lion with GCC 4.2.1 and Boost 1.48.

comment:3 by Ben Brian <bb51@…>, 11 years ago

Cc: bb51@… added

comment:4 by curdeius@…, 10 years ago

The problem still exists on Win7 x64 with MSVC2010 and Boost 1.52. The patch works of course as it should.

comment:5 by ludolab31@…, 8 years ago

The problem still exists on OS X 10.8.5 with Boost 1.55.0. Output of clang++ --version:

Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

comment:5 by ludolab31@…, 8 years ago

The problem still exists on OS X 10.8.5 with Boost 1.55.0. Output of clang++ --version:

Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin12.5.0
Thread model: posix

Note: See TracTickets for help on using tickets.