diff --git a/examples/chapter11_07/chapter11_07.vcxproj b/examples/chapter11_07/chapter11_07.vcxproj
index 226a4b3a6..f47a45678 100644
--- a/examples/chapter11_07/chapter11_07.vcxproj
+++ b/examples/chapter11_07/chapter11_07.vcxproj
@@ -287,8 +287,8 @@
-
-
+
+
diff --git a/examples/chapter11_07/chapter11_07.vcxproj.filters b/examples/chapter11_07/chapter11_07.vcxproj.filters
index 6ba8795bc..b701821dd 100644
--- a/examples/chapter11_07/chapter11_07.vcxproj.filters
+++ b/examples/chapter11_07/chapter11_07.vcxproj.filters
@@ -290,12 +290,6 @@
src\mcal\host
-
- src\mcal
-
-
- src\mcal
-
src\os\FreeRTOS\Source\include
@@ -449,6 +443,12 @@
src\math\checksums\crc
+
+ src\mcal
+
+
+ src\mcal
+
diff --git a/examples/chapter11_07/src/os/FreeRTOS/Source/include/cfg/WIN32-MSVC-Static-Allocation-Only/FreeRTOSConfig.h b/examples/chapter11_07/src/os/FreeRTOS/Source/include/cfg/WIN32-MSVC-Static-Allocation-Only/FreeRTOSConfig.h
index 6125de55c..7dfdfe278 100644
--- a/examples/chapter11_07/src/os/FreeRTOS/Source/include/cfg/WIN32-MSVC-Static-Allocation-Only/FreeRTOSConfig.h
+++ b/examples/chapter11_07/src/os/FreeRTOS/Source/include/cfg/WIN32-MSVC-Static-Allocation-Only/FreeRTOSConfig.h
@@ -56,8 +56,8 @@ configTOTAL_HEAP_SIZE is not defined. */
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
-#define configCPU_CLOCK_HZ (( unsigned long) 16000000ULL)
-#define configTICK_RATE_HZ (( TickType_t) 1000ULL)
+#define configCPU_CLOCK_HZ ((unsigned long) 16000000ULL)
+#define configTICK_RATE_HZ ((TickType_t) 1000ULL)
#define configMAX_PRIORITIES (4)
#define configMINIMAL_STACK_SIZE ((unsigned short) 96)
#define configMAX_TASK_NAME_LEN (32)
diff --git a/examples/chapter16_08/chapter16_08.vcxproj b/examples/chapter16_08/chapter16_08.vcxproj
index 0a07f5c90..5a4c75792 100644
--- a/examples/chapter16_08/chapter16_08.vcxproj
+++ b/examples/chapter16_08/chapter16_08.vcxproj
@@ -54,12 +54,12 @@
- $(SolutionDir)\src;$(SolutionDir)\src\mcal\win32;C:\boost\boost_1_86_0;$(IncludePath)
+ $(SolutionDir)\src;$(SolutionDir)\src\mcal\win32;C:\boost\boost_1_87_0;$(IncludePath)
$(SolutionDir)$(Configuration)\
$(Configuration)\
- $(SolutionDir)\src;$(SolutionDir)\src\mcal\win32;C:\boost\boost_1_86_0;$(IncludePath)
+ $(SolutionDir)\src;$(SolutionDir)\src\mcal\win32;C:\boost\boost_1_87_0;$(IncludePath)
$(SolutionDir)$(Configuration)\
$(Configuration)\
@@ -78,6 +78,7 @@
$(SolutionDir)$(Configuration)\$(ProjectName).exe
true
Console
+ $(ProjectDir)src\math\test\wstp64i4.lib;%(AdditionalDependencies)
@@ -95,6 +96,7 @@
Console
true
true
+ $(ProjectDir)src\math\test\wstp64i4.lib;%(AdditionalDependencies)
diff --git a/examples/chapter16_08/src/math/test/math_test_independent_test_system_base.h b/examples/chapter16_08/src/math/test/math_test_independent_test_system_base.h
index 86a7e48f2..02c47614d 100644
--- a/examples/chapter16_08/src/math/test/math_test_independent_test_system_base.h
+++ b/examples/chapter16_08/src/math/test/math_test_independent_test_system_base.h
@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////////
-// Copyright Christopher Kormanyos 2019 - 2022.
+// Copyright Christopher Kormanyos 2019 - 2024.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-#ifndef MATH_TEST_INDEPENDENT_TEST_SYSTEM_BASE_2020_07_16_H_
- #define MATH_TEST_INDEPENDENT_TEST_SYSTEM_BASE_2020_07_16_H_
+#ifndef MATH_TEST_INDEPENDENT_TEST_SYSTEM_BASE_2020_07_16_H
+ #define MATH_TEST_INDEPENDENT_TEST_SYSTEM_BASE_2020_07_16_H
#include
@@ -17,7 +17,7 @@
public:
virtual ~independent_test_system_base() noexcept = default;
- virtual bool is_prime(const char* const pstr_prime_candidate) const = 0;
+ virtual auto is_prime(const char* const pstr_prime_candidate) const -> bool = 0;
protected:
independent_test_system_base() noexcept = default;
@@ -27,4 +27,4 @@
} // namespace math
} // namespace WIDE_INTEGER_NAMESPACE
-#endif // MATH_TEST_INDEPENDENT_TEST_SYSTEM_BASE_2020_07_16_H_
+#endif // MATH_TEST_INDEPENDENT_TEST_SYSTEM_BASE_2020_07_16_H
diff --git a/examples/chapter16_08/src/math/test/math_test_independent_test_system_boost.h b/examples/chapter16_08/src/math/test/math_test_independent_test_system_boost.h
index 6e463bae7..e751a9ae6 100644
--- a/examples/chapter16_08/src/math/test/math_test_independent_test_system_boost.h
+++ b/examples/chapter16_08/src/math/test/math_test_independent_test_system_boost.h
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
-// Copyright Christopher Kormanyos 2020 -2022.
+// Copyright Christopher Kormanyos 2020 -2024.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/examples/chapter16_08/src/math/test/math_test_independent_test_system_mathlink.h b/examples/chapter16_08/src/math/test/math_test_independent_test_system_mathlink.h
index 41ab96887..388e1fcc5 100644
--- a/examples/chapter16_08/src/math/test/math_test_independent_test_system_mathlink.h
+++ b/examples/chapter16_08/src/math/test/math_test_independent_test_system_mathlink.h
@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////////
-// Copyright Christopher Kormanyos 2019 - 2022.
+// Copyright Christopher Kormanyos 2019 - 2024.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-#ifndef MATH_TEST_INDEPENDENT_TEST_SYSTEM_MATHLINK_2019_12_29_H_
- #define MATH_TEST_INDEPENDENT_TEST_SYSTEM_MATHLINK_2019_12_29_H_
+#ifndef MATH_TEST_INDEPENDENT_TEST_SYSTEM_MATHLINK_2019_12_29_H
+ #define MATH_TEST_INDEPENDENT_TEST_SYSTEM_MATHLINK_2019_12_29_H
#include
#include
@@ -40,7 +40,7 @@
namespace detail {
- inline constexpr char* strcpy_unsafe(char* dst, const char* src)
+ inline constexpr auto strcpy_unsafe(char* dst, const char* src) -> char*
{
// Use a local implementation of string copy.
while((*dst++ = *src++) != char('\0')) { ; }
@@ -48,7 +48,7 @@
return dst;
}
- inline constexpr std::uint_fast32_t strlen_unsafe(const char* pstr)
+ inline constexpr auto strlen_unsafe(const char* pstr) -> std::uint_fast32_t
{
// Use a local implementation of string length.
std::uint_fast32_t u = 0U;
@@ -65,13 +65,12 @@
} // namespace detail
template
- class independent_test_system_mathlink
- : public math::test::independent_test_system_base
+ class independent_test_system_mathlink : public math::test::independent_test_system_base
{
private:
- static constexpr int RETURNPKT = 3;
+ static constexpr int RETURNPKT { 3 };
- static constexpr int return_packet_id() { return RETURNPKT; }
+ static constexpr auto return_packet_id() noexcept -> int { return RETURNPKT; }
public:
// This is the computer_algebra_system_mathlink class.
@@ -89,7 +88,7 @@
static_cast(close_is_ok);
}
- virtual bool is_prime(const char* const pstr_prime_candidate) const override
+ auto is_prime(const char* const pstr_prime_candidate) const -> bool override
{
// Test with, for eample,
// PrimeQ[FromDigits["A6BAC43FEE73E832401B1E32417BD0AF",16]]
@@ -101,14 +100,14 @@
return (send_command(str_cmd, &str_rsp) && (str_rsp == "True"));
}
- static constexpr bool get_valid() noexcept { return my_valid; }
+ static constexpr auto get_valid() noexcept -> bool { return my_valid; }
private:
static bool my_valid;
static WSENV env_ptr;
static WSLINK lnk_ptr;
- static bool send_command(const std::string& str_cmd, std::string* str_rsp)
+ static auto send_command(const std::string& str_cmd, std::string* str_rsp) -> bool
{
const bool suppress_output = (str_rsp == nullptr);
@@ -162,17 +161,17 @@
return result_is_ok;
}
- static constexpr WSENV& global_env_ptr() noexcept { return env_ptr; }
- static constexpr WSLINK& global_lnk_ptr() noexcept { return lnk_ptr; }
+ static constexpr auto global_env_ptr() noexcept -> WSENV& { return env_ptr; }
+ static constexpr auto global_lnk_ptr() noexcept -> WSLINK& { return lnk_ptr; }
- static int next_packet () noexcept { return ::WSNextPacket (global_lnk_ptr()); }
- static int new_packet () noexcept { return ::WSNewPacket (global_lnk_ptr()); }
- static bool put_function(const std::string& str, int argc) noexcept { return (::WSPutFunction(global_lnk_ptr(), str.c_str(), argc) != 0); }
- static bool put_string (const std::string& str) noexcept { return (::WSPutString (global_lnk_ptr(), str.c_str()) != 0); }
- static bool end_packet () noexcept { return (::WSEndPacket (global_lnk_ptr()) != 0); }
- static int error () noexcept { return ::WSError (global_lnk_ptr()); }
+ static auto next_packet () noexcept -> int { return ::WSNextPacket (global_lnk_ptr()); }
+ static auto new_packet () noexcept -> int { return ::WSNewPacket (global_lnk_ptr()); }
+ static auto put_function(const std::string& str, int argc) noexcept -> bool { return (::WSPutFunction(global_lnk_ptr(), str.c_str(), argc) != 0); }
+ static auto put_string (const std::string& str) noexcept -> bool { return (::WSPutString (global_lnk_ptr(), str.c_str()) != 0); }
+ static auto end_packet () noexcept -> bool { return (::WSEndPacket (global_lnk_ptr()) != 0); }
+ static auto error () noexcept -> int { return ::WSError (global_lnk_ptr()); }
- static bool get_string(std::string* str_rsp)
+ static auto get_string(std::string* str_rsp) -> bool
{
const char* s = nullptr;
@@ -190,13 +189,13 @@
return get_string_is_ok;
}
- static constexpr bool is_open() noexcept
+ static constexpr auto is_open() noexcept -> bool
{
return ( (global_env_ptr() != nullptr)
&& (global_lnk_ptr() != nullptr));
}
- static bool open(const char* str_location_math_kernel_user = PtrStrLocationMathLinkKernel) noexcept
+ static auto open(const char* str_location_math_kernel_user = PtrStrLocationMathLinkKernel) noexcept -> bool
{
// Initialize the mathlink kernel.
global_env_ptr() = ::WSInitialize(nullptr);
@@ -212,8 +211,10 @@
// TBD: What about supporting non-Win* platforms like *nix?
- constexpr char str_location_math_kernel_default[] =
- "\"C:\\Program Files\\Wolfram Research\\Mathematica\\12.0\\MathKernel.exe\"";
+ constexpr char str_location_math_kernel_default[]
+ {
+ "\"C:\\Program Files\\Wolfram Research\\Mathematica\\14.0\\MathKernel.exe\""
+ };
// Create a list of constant arguments for opening the mathlink kernel.
using const_args_strings_type = std::array;
@@ -258,7 +259,7 @@
return is_open();
}
- static bool close() noexcept
+ static auto close() noexcept -> bool
{
const bool close_is_ok = is_open();
@@ -280,12 +281,12 @@
}
};
- template bool math::test::independent_test_system_mathlink::my_valid = false;
- template WSENV math::test::independent_test_system_mathlink::env_ptr = nullptr;
- template WSLINK math::test::independent_test_system_mathlink::lnk_ptr = nullptr;
+ template bool math::test::independent_test_system_mathlink::my_valid { false };
+ template WSENV math::test::independent_test_system_mathlink::env_ptr { nullptr };
+ template WSLINK math::test::independent_test_system_mathlink::lnk_ptr { nullptr };
} // namespace test
} // namespace math
} // namespace WIDE_INTEGER_NAMESPACE
-#endif // MATH_TEST_INDEPENDENT_TEST_SYSTEM_MATHLINK_2019_12_29_H_
+#endif // MATH_TEST_INDEPENDENT_TEST_SYSTEM_MATHLINK_2019_12_29_H
diff --git a/examples/chapter16_08/src/math/test/math_test_independent_test_system_none.h b/examples/chapter16_08/src/math/test/math_test_independent_test_system_none.h
index 2eade0e1b..d5fe614c4 100644
--- a/examples/chapter16_08/src/math/test/math_test_independent_test_system_none.h
+++ b/examples/chapter16_08/src/math/test/math_test_independent_test_system_none.h
@@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////////
-// Copyright Christopher Kormanyos 2019 - 2022.
+// Copyright Christopher Kormanyos 2019 - 2024.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//
-#ifndef MATH_TEST_INDEPENDENT_TEST_SYSTEM_NONE_2020_07_15_H_
- #define MATH_TEST_INDEPENDENT_TEST_SYSTEM_NONE_2020_07_15_H_
+#ifndef MATH_TEST_INDEPENDENT_TEST_SYSTEM_NONE_2020_07_15_H
+ #define MATH_TEST_INDEPENDENT_TEST_SYSTEM_NONE_2020_07_15_H
#include