Skip to content

Commit e87a21b

Browse files
refactor: Update error messages for comparison result representation in invoker module
1 parent b602a84 commit e87a21b

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/operations/invoker.cppm

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,10 @@ constexpr auto compare_three_way(T lhs, T rhs) -> policy::value::decision<T> {
490490
template <typename T>
491491
constexpr auto compare_less_than(T lhs, T rhs) -> policy::value::decision<T> {
492492
policy::value::decision<T> out{};
493-
if constexpr (!(requires { T{0}; T{1}; T{2}; T{3}; })) {
493+
if constexpr (!(requires { T{0}; T{1}; })) {
494494
return make_error<T>(
495495
policy::error::kind::unspecified,
496-
"less than comparison codes are not representable for common type");
496+
"less than comparison result is not representable for common type");
497497
}
498498

499499
if constexpr (std::same_as<std::remove_cv_t<T>, bool>) {
@@ -518,10 +518,10 @@ constexpr auto compare_less_than(T lhs, T rhs) -> policy::value::decision<T> {
518518
template <typename T>
519519
constexpr auto compare_greater_than(T lhs, T rhs) -> policy::value::decision<T> {
520520
policy::value::decision<T> out{};
521-
if constexpr (!(requires { T{0}; T{1}; T{2}; T{3}; })) {
521+
if constexpr (!(requires { T{0}; T{1}; })) {
522522
return make_error<T>(
523523
policy::error::kind::unspecified,
524-
"greater than comparison codes are not representable for common type");
524+
"greater than comparison result is not representable for common type");
525525
}
526526

527527
if constexpr (std::same_as<std::remove_cv_t<T>, bool>) {
@@ -547,10 +547,10 @@ template <typename T>
547547
constexpr auto compare_less_than_or_equal(T lhs, T rhs)
548548
-> policy::value::decision<T> {
549549
policy::value::decision<T> out{};
550-
if constexpr (!(requires { T{0}; T{1}; T{2}; T{3}; })) {
550+
if constexpr (!(requires { T{0}; T{1}; })) {
551551
return make_error<T>(
552552
policy::error::kind::unspecified,
553-
"less than or equal comparison codes are not representable for common type");
553+
"less than or equal comparison result is not representable for common type");
554554
}
555555

556556
if constexpr (std::same_as<std::remove_cv_t<T>, bool>) {
@@ -576,10 +576,10 @@ template <typename T>
576576
constexpr auto compare_greater_than_or_equal(T lhs, T rhs)
577577
-> policy::value::decision<T> {
578578
policy::value::decision<T> out{};
579-
if constexpr (!(requires { T{0}; T{1}; T{2}; T{3}; })) {
579+
if constexpr (!(requires { T{0}; T{1}; })) {
580580
return make_error<T>(
581581
policy::error::kind::unspecified,
582-
"greater than or equal comparison codes are not representable for common type");
582+
"greater than or equal comparison result is not representable for common type");
583583
}
584584

585585
if constexpr (std::same_as<std::remove_cv_t<T>, bool>) {

0 commit comments

Comments
 (0)