Skip to content

Make std::variant<> a soft error (SFINAE friendly) #111268

@ilazaric

Description

@ilazaric

https://godbolt.org/z/8xojM67ev
Simplified, without <variant> : https://godbolt.org/z/KdK8n76hb
Proposed alternative, on simplified: https://godbolt.org/z/PPrPzjfb1
So instead of the internal static_assert(), I suggest moving the condition into a constraint
The static_assert() in question: https://github.com/llvm/llvm-project/blob/main/libcxx/include/variant#L1164

Metadata

Metadata

Assignees

No one assigned

    Labels

    libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.wontfixIssue is real, but we can't or won't fix it. Not invalid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions