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

String/StringView/UUIDValueに三方比較演算子を実装 #664

Merged
merged 2 commits into from Oct 2, 2021

Conversation

tetsurom
Copy link
Contributor

@tetsurom tetsurom commented Oct 1, 2021

Part of #658

String

assert(U"a"_s == U"a"_s);
assert(U"b"_s != U"a"_s);
assert(U"b"_s >  U"a"_s);
assert(U"b"_s >= U"a"_s);
assert(U"b"_s <  U"c"_s);
assert(U"b"_s <= U"c"_s);

assert(U"a" == U"a"_s);
assert(U"b" != U"a"_s);
assert(U"b" >  U"a"_s);
assert(U"b" >= U"a"_s);
assert(U"b" <  U"c"_s);
assert(U"b" <= U"c"_s);

assert(U"a"_s == U"a");
assert(U"b"_s != U"a");
assert(U"b"_s >  U"a");
assert(U"b"_s >= U"a");
assert(U"b"_s <  U"c");
assert(U"b"_s <= U"c");

StringView

static_assert(U"a"_sv == U"a"_sv);
static_assert(U"b"_sv != U"a"_sv);
static_assert(U"b"_sv >  U"a"_sv);
static_assert(U"b"_sv >= U"a"_sv);
static_assert(U"b"_sv <  U"c"_sv);
static_assert(U"b"_sv <= U"c"_sv);

assert(U"a"_sv == U"a"_s);
assert(U"b"_s  != U"a"_sv);
assert(U"b"_sv >  U"a");
assert(U"b"    >= U"a"_s);

UUIDValue

UUIDValue id1{ std::array<std::uint8_t, 16> { 0 } };
UUIDValue id2{ std::array<std::uint8_t, 16> { 1 } };
assert(id1 == id1);
assert(id1 != id2);
assert(id2 >  id1);
assert(id2 >= id1);
assert(id1 <  id2);
assert(id1 <= id2);

@Reputeless Reputeless added this to ToDo in v0.6 Roadmap Oct 1, 2021
@tetsurom tetsurom changed the title Array/Optional/String/StringView/UUIDValueに三方比較演算子を実装 String/StringView/UUIDValueに三方比較演算子を実装 Oct 1, 2021
@tetsurom
Copy link
Contributor Author

tetsurom commented Oct 1, 2021

Array/Optionalは見直しが必要そうなので一度下げます。

@Reputeless Reputeless merged commit 3614bc7 into Siv3D:v6_develop Oct 2, 2021
v0.6 Roadmap automation moved this from ToDo to Done Oct 2, 2021
@Reputeless
Copy link
Member

Merged. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants