Skip to content

[Boost version] Bad detection of std::aligned_alloc for XCode 12.2 with -std=c++1z #1711

@joaquintides

Description

@joaquintides

As shown here: https://drone.cpp.al/boostorg/unordered/1601/52/2

In file included from ./boost/asio.hpp:20:
In file included from ./boost/asio/any_completion_executor.hpp:22:
In file included from ./boost/asio/execution.hpp:19:
In file included from ./boost/asio/execution/any_executor.hpp:24:
In file included from ./boost/asio/detail/executor_function.hpp:19:
In file included from ./boost/asio/detail/handler_alloc_helpers.hpp:19:
./boost/asio/detail/memory.hpp:107:15: error: no member named 'aligned_alloc' in namespace 'std'; did you mean simply 'aligned_alloc'?
  void* ptr = std::aligned_alloc(align, size);
              ^~~~~~~~~~~~~~~~~~
              aligned_alloc
/Applications/Xcode-12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/malloc/_malloc.h:50:10: note: 'aligned_alloc' declared here
void    *aligned_alloc(size_t __alignment, size_t __size) __result_use_check __alloc_size(2) __OSX_AVAILABLE(10.15) __IOS_AVAILABLE(13.0) __TVOS_AVAILABLE(13.0) __WATCHOS_AVAILABLE(6.0);
         ^
1 error generated.

This issue seems to be directly related to boostorg/asio@8b80ad7. I know Boost.Asio is generated by script from standalone Asio, but the code in chriskohlhoff/asio/blob/master/include/asio/detail/config.hpp does not include the change, so I'm obviously not getting entirely how these two libraries relate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions