Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Apr 8, 2023

Follows up #3584.


Failed with error message (which is buggy):

error: cannot take address of consteval function '_Make_dynamic_indices' outside of an immediate invocation

Reduced example:

#include <cstddef>

template<std::size_t>
struct my_tag {};

template <class = void>
struct Foo {
    static constexpr std::size_t rank() noexcept {
        return 1;
    }

    static consteval my_tag<rank()> get() noexcept { // or uses auto in the return type
        return my_tag<rank()>{};
    }

    static constexpr my_tag<rank()> value = get();
};

The bug seems fixed in Clang 16 (Godbolt link).

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner April 8, 2023 06:48
@StephanTLavavej StephanTLavavej added blocked Something is preventing work on this mdspan C++23 mdspan labels Apr 8, 2023
@CaseyCarter CaseyCarter removed the blocked Something is preventing work on this label May 18, 2023
@StephanTLavavej StephanTLavavej merged commit 42dedfd into microsoft:feature/mdspan2 May 24, 2023
@StephanTLavavej
Copy link
Member

Perfect, thanks! 🎉

@frederick-vs-ja frederick-vs-ja deleted the mdspan-consteval branch May 24, 2023 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mdspan C++23 mdspan

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants