Opened 8 years ago

Last modified 8 years ago

#10982 new Bugs

addressof.hpp: should BOOST_ASIO_HAS_STD_ADDRESSOF be replaced with BOOST_NO_CXX11_ADDRESSOF ?

Reported by: lukasz.forynski@… Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

Hi,

I'm on the border-line with compilers supporting (or not) various C++0x versions, and found this to be an issue: boost config already contains a macro:

BOOST_NO_CXX11_ADDRESSOF

However, in BoostAsio - this looks like a duplication that really ignores the config, and in order to compile asio BOOST_ASIO_HAS_STD_ADDRESSOF needs also be defined.

Shouldn't it be replaced by BOOST_NO_CXX11_ADDRESSOF defined in config instead?

Change History (2)

comment:1 by lukasz.forynski@…, 8 years ago

Sorry, I did not dig into problem deep enough, it looks like my compiler: gcc 4.5.3 does not support std::addressof, thus boost::asio config does not set it properly in asio/detail/config.hpp. Should the check go deaper and include GNUC_PATCHLEVEL perhaps?

But still, it looks like the global config gets ignored, i.e. shouldn't

BOOST_NO_CXX11_ADDRESSOF imply: BOOST_ASIO_HAS_STD_ADDRESSOF ?

comment:2 by viboes, 8 years ago

Component: Noneasio
Owner: set to chris_kohlhoff
Note: See TracTickets for help on using tickets.