Skip to content

C++11 build fails on Apple Clang because destroy_at is declared constexpr void #89

@kiranj26

Description

@kiranj26

Description

Building from develop fails with C++11 on Apple Clang due to destroy_at in src/Defines.h being declared as constexpr void in the C++11 path.

Expected behavior

Project builds successfully with C++11.

Actual behavior

Compilation fails with an error similar to:
constexpr function's return type 'void' is not a literal type

Reproduction

  1. Checkout develop
  2. Run:
    • python setup.py
    • ./build_test.sh
  3. Observe compile failure in src/Defines.h at the C++11 destroy_at declaration.

Environment

  • OS: macOS (arm64)
  • Compiler: Apple Clang 17
  • C++ standard: C++11

Notes

A minimal fix is to change the C++11 declaration from:
constexpr void destroy_at(T* p)
to:
inline void destroy_at(T* p)
while keeping C++14/C++17+ behavior unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions