Skip to content

macOS: -std=c++17 requires -mmacosx-version-min=10.14 #44

@jbarlow83

Description

@jbarlow83

On macOS, it is not possible to compile with -std=c++17 unless -mmacosx-version-min=10.14. macOS 10.14 is Mojave, the latest version.

It would be best to select -std=c++14 on macOS since it is far more compatible with older versions. Alternately, perhaps something can be fixed in pybind11.h to improve compatibility.

If macOS version is -mmacosx-version-min=10.7, error messages like:

pybind11/pybind11.h:1011:9: error: call to unavailable function 'operator delete': introduced in macOS 10.12
        ::operator delete(p, s);
        ^~~~~~~~~~~~~~~~~

If macOS 10.12 (or 10.13) is selected, as suggested, errors (perhaps unintended) still appear:

pybind11/pybind11.h:1009:9: error: no matching function for call to 'operator delete'
        ::operator delete(p, s, std::align_val_t(a));
        ^~~~~~~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions