Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Methods on empty std::array not declared as constexpr #1835

Closed
levinli303 opened this issue Jan 27, 2023 · 2 comments
Closed

[BUG] Methods on empty std::array not declared as constexpr #1835

levinli303 opened this issue Jan 27, 2023 · 2 comments
Labels

Comments

@levinli303
Copy link

levinli303 commented Jan 27, 2023

Description

The specialization of array<_Tp, 0> is missing constexpr on its methods.

In the <array> header array has

    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
    value_type* data() _NOEXCEPT {return __elems_;}

it has _LIBCPP_CONSTEXPR_AFTER_CXX14

But in specialization array<_Tp, 0>

    _LIBCPP_INLINE_VISIBILITY
    value_type* data() _NOEXCEPT {return reinterpret_cast<value_type*>(__elems_);}

it does not have it.

Upstream libc++ https://reviews.llvm.org/D80821 fixed it as early as in clang 11. Maybe NDK has not updated the array header?

Affected versions

r25

Canary version

No response

Host OS

Linux, Mac, Windows

Host OS version

macOS 13

Affected ABIs

armeabi-v7a, arm64-v8a, x86, x86_64

Build system

CMake

Other build system

No response

minSdkVersion

21

Device API level

No response

@levinli303 levinli303 added the bug label Jan 27, 2023
@levinli303 levinli303 changed the title [BUG]Methods on empty std::array not declared as constexpr Jan 27, 2023
@stephenhines stephenhines closed this as not planned Won't fix, can't repro, duplicate, stale Jan 27, 2023
@stephenhines
Copy link
Collaborator

This is a duplicate of #1530 as libcxx hasn't been updated yet.

@stephenhines
Copy link
Collaborator

Duplicate of #1530

@stephenhines stephenhines marked this as a duplicate of #1530 Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants