Opened 11 years ago

Closed 9 years ago

#5773 closed Bugs (wontfix)

boost.smart_ptr clashes with PAM

Reported by: SebastianLuther@… Owned by: Peter Dimov
Milestone: To Be Determined Component: smart_ptr
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:

Description

The following test case (reduced from drizzle [1]) compiles fine with with boost-1.46.1 and failes with boost-1.47.0.

$ cat test.cpp 
#include <security/pam_misc.h>
#include <boost/shared_ptr.hpp>
int main() {}


$ g++ test.cpp 
In file included from /usr/include/boost/smart_ptr/shared_ptr.hpp:32,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from test.cpp:2:
/usr/include/boost/smart_ptr/detail/shared_count.hpp: In constructor 'boost::detail::shared_count::shared_count(P, boost::detail::sp_inplace_tag<D>)':
/usr/include/boost/smart_ptr/detail/shared_count.hpp:164: error: expected ';' before '(' token
/usr/include/boost/smart_ptr/detail/shared_count.hpp: In constructor 'boost::detail::shared_count::shared_count(P, boost::detail::sp_inplace_tag<D>, A)':
/usr/include/boost/smart_ptr/detail/shared_count.hpp:250: error: expected ';' before '(' token

security/pam_misc.h belongs to PAM [2]

[1] http://www.drizzle.org/
[2] http://www.kernel.org/pub/linux/libs/pam/

Change History (3)

comment:1 by SebastianLuther@…, 11 years ago

It actually collides with a macro #define D(x) defined in security/_pam_macros.h.

in reply to:  1 comment:2 by Olaf van der Spek <olafvdspek@…>, 11 years ago

Replying to SebastianLuther@…:

It actually collides with a macro #define D(x) defined in security/_pam_macros.h.

Looks like a bug in PAM. It should not define macros with such common and simple names.

comment:3 by Peter Dimov, 9 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.