diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-22 07:55:15 -0500 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-22 07:55:20 -0500 |
| commit | 10b3e4fbd0779833d3f2c7cff3c1d802664fa358 (patch) | |
| tree | 9b520432ff0651c258b3c1a215606cf8b3a5915f | |
| parent | 32af6ab79fe52efa6fc773a672e2732388999692 (diff) | |
feat: lib: logic module improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
| -rw-r--r-- | dev/lib/fix/fix.hpp | 8 | ||||
| -rw-r--r-- | dev/lib/logic/equiv.hpp | 2 | ||||
| -rw-r--r-- | dev/lib/logic/math.hpp | 8 |
3 files changed, 8 insertions, 10 deletions
diff --git a/dev/lib/fix/fix.hpp b/dev/lib/fix/fix.hpp index 4f02e28..08360d5 100644 --- a/dev/lib/fix/fix.hpp +++ b/dev/lib/fix/fix.hpp @@ -35,22 +35,22 @@ namespace ocl::fix namespace detail { template <typename char_type = char> - const char_type* begin_fix(); + const char_type* begin_fix() noexcept; template <> - inline const char* begin_fix<char>() + inline const char* begin_fix<char>() noexcept { return "FIX.4.2"; } template <> - inline const char16_t* begin_fix<char16_t>() + inline const char16_t* begin_fix<char16_t>() noexcept { return u"FIX.4.2"; } template <> - inline const char8_t* begin_fix<char8_t>() + inline const char8_t* begin_fix<char8_t>() noexcept { return u8"FIX.4.2"; } diff --git a/dev/lib/logic/equiv.hpp b/dev/lib/logic/equiv.hpp index 1d16958..1bdb6d9 100644 --- a/dev/lib/logic/equiv.hpp +++ b/dev/lib/logic/equiv.hpp @@ -1,6 +1,6 @@ /* * File: equiv.hpp - * Purpose: Equivalence runtime c++ header. + * Purpose: Equivalence header. * Author: Amlal El Mahrouss (amlal@nekernel.org) * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ diff --git a/dev/lib/logic/math.hpp b/dev/lib/logic/math.hpp index ce73aa6..52f4535 100644 --- a/dev/lib/logic/math.hpp +++ b/dev/lib/logic/math.hpp @@ -7,11 +7,9 @@ #pragma once -#include <cmath> - namespace ocl { - template <std::size_t T> + template <__SIZE_TYPE__ T> struct is_non_boolean_integer final { static constexpr const bool value = true; @@ -29,7 +27,7 @@ namespace ocl static constexpr const bool value = false; }; - constexpr inline auto not_a_number = NAN; - constexpr inline auto positive_infinity = INFINITY; + constexpr inline auto not_a_number = __builtin_nanf (""); + constexpr inline auto positive_infinity = __builtin_inff (); constexpr inline auto negative_infinity = -positive_infinity; } // namespace ocl
\ No newline at end of file |
