Skip to content

Fails to build on MacOS if using C++17 and deployment target < 10.14 #99

@szarvas

Description

@szarvas

Prior to 981a1d3 I could use XCode with the following settings

  • macOS Deployment Target: 10.11
  • C++ Language Dialect: C++17

Since 981a1d3 I get the following compile error:
"Aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.14 or newer"

The error can be triggered by e.g.
auto queue = new moodycamel::ReaderWriterQueue<int>();

I can still successfully build the readerwriterqueue related files if I

  1. either drop C++17 dialect to C++14,
  2. or change deployment target to 10.14

Neither is ideal, so right now my best option is to stick to prior 981a1d3.

I don't fully understand why the allocation function requirement goes away when switching back to C++14, but I thought it could be used to still support macOS 10.11 and C++17 in the future commits.

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