| 301 | |
| 302 | template <typename T> |
| 303 | bool IsSame(const T& lv, const T& rv) |
| 304 | { |
| 305 | if constexpr(std::is_same_v<double, T>) |
| 306 | { |
| 307 | constexpr double EPS = static_cast<double>(std::numeric_limits<float>::epsilon()); |
| 308 | return std::abs(lv - rv) <= EPS; |
| 309 | } |
| 310 | else |
| 311 | { |
| 312 | return (lv == rv); |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | struct ExprComparison : ExprBase |
| 317 | { |