Skip to content

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
profezzorn committed Dec 30, 2024
1 parent 1c0cf8e commit d975c98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions transitions/concat.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@ class TrConcat2 {
}
};

template <typename R, bool result = std::is_same<decltype(((R*)nullptr)->getColor(0).c.r), uint16_t>::value>
template <typename R, bool result = std::is_same<decltype(std::declval<R*>()->getColor(0).c.r), uint16_t>::value>
constexpr bool hasGetColorHelper(int) {
return result;
}
template <typename R> constexpr bool hasGetColorHelper(...) { return false; }
template <typename R> constexpr bool hasGetColor() { return hasGetColorHelper<R>(0); }

static_assert(std::is_same<decltype(((Black*)nullptr)->getColor(0).c.r), uint16_t>::value, "getcolor has changed...");
static_assert(std::is_same<decltype(std::declval<Black*>()->getColor(0).c.r), uint16_t>::value, "getcolor has changed...");
static_assert(hasGetColor<Black>(), "hasGetColor is not working");
static_assert(!hasGetColor<Int<1>>(), "hasGetColor is not working");

Expand Down

0 comments on commit d975c98

Please sign in to comment.