Skip to content

<compare>: 0 <=> partial_ordering::unordered returns invalid value #1050

@statementreply

Description

@statementreply

Command-line test case

C:\Users\He\source\test>type partial_unordered.cpp
#include <compare>

static_assert(0 <=> std::partial_ordering::unordered == std::partial_ordering::unordered);

C:\Users\He\source\test>cl /EHsc /std:c++latest /W4 /WX /c partial_unordered.cpp
用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.27.29016 版
版权所有(C) Microsoft Corporation。保留所有权利。

/std:c++latest 作为最新的 C++
working 草稿中的语言功能预览提供。我们希望你提供有关 bug 和改进建议的反馈。
但是,请注意,这些功能按原样提供,没有支持,并且会随着工作草稿的变化
而更改或移除。有关详细信息,请参阅
https://go.microsoft.com/fwlink/?linkid=2045807。

partial_unordered.cpp
partial_unordered.cpp(3): error C2607: 静态断言失败

The error message means "static assertion failed".

STL version

https://github.com/microsoft/STL/commit/8fcc25fe97bee8fa64232aed5848df0d7c0b6d42

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedSomething works now, yay!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions