diff options
Diffstat (limited to 'dev')
29 files changed, 46 insertions, 45 deletions
diff --git a/dev/examples/allocator_system/allocator_system.cc b/dev/examples/allocator_system/allocator_system.cc index 6e7bc6d..6bf1de7 100644 --- a/dev/examples/allocator_system/allocator_system.cc +++ b/dev/examples/allocator_system/allocator_system.cc @@ -2,7 +2,7 @@ * File: allocator_system.cc * Purpose: Allocator System container. * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss. Licensed under the BSL 1.0 license + * Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License. Licensed under the BSL 1.0 license */ #include <lib/memory/allocator_system.hpp> diff --git a/dev/examples/cgi/cgi.cc b/dev/examples/cgi/cgi.cc index 692f90c..3e08aad 100644 --- a/dev/examples/cgi/cgi.cc +++ b/dev/examples/cgi/cgi.cc @@ -1,7 +1,7 @@ /* cgi example written by Amlal El Mahrouss. - licensed under the MIT license + licensed under the Boost Software License */ #include <lib/utility/cgi_writer.hpp> diff --git a/dev/examples/equiv/equiv.cc b/dev/examples/equiv/equiv.cc index 12207f4..41128a2 100644 --- a/dev/examples/equiv/equiv.cc +++ b/dev/examples/equiv/equiv.cc @@ -1,7 +1,7 @@ /* string checksum example written by Amlal El Mahrouss. - licensed under the MIT license + licensed under the Boost Software License */ #include <lib/logic/equiv.hpp> diff --git a/dev/examples/fix/fix.cc b/dev/examples/fix/fix.cc index 4015a67..e09178b 100644 --- a/dev/examples/fix/fix.cc +++ b/dev/examples/fix/fix.cc @@ -1,7 +1,7 @@ /* fix example written by Amlal El Mahrouss. - licensed under the MIT license + licensed under the Boost Software License */ #include <lib/core/error_handler.hpp> diff --git a/dev/examples/opt/opt.cc b/dev/examples/opt/opt.cc index b34f2c7..acd59fd 100644 --- a/dev/examples/opt/opt.cc +++ b/dev/examples/opt/opt.cc @@ -1,7 +1,7 @@ /* - string checksum example - written by Amlal El Mahrouss. - licensed under the MIT license + String checksum example + Written by Amlal El Mahrouss. + Licensed under the Boost Software License */ #include <lib/logic/opt.hpp> diff --git a/dev/examples/tracked_ptr/tracked_ptr.cc b/dev/examples/tracked_ptr/tracked_ptr.cc index 6e3f4a2..27d942c 100644 --- a/dev/examples/tracked_ptr/tracked_ptr.cc +++ b/dev/examples/tracked_ptr/tracked_ptr.cc @@ -1,7 +1,7 @@ /* tracked_ptr example written by Amlal El Mahrouss. - licensed under the MIT license + licensed under the Boost Software License */ #include <lib/memory/tracked_ptr.hpp> diff --git a/dev/lib/core/chunk_string.hpp b/dev/lib/core/chunk_string.hpp index 7e5360c..0ecc73e 100644 --- a/dev/lib/core/chunk_string.hpp +++ b/dev/lib/core/chunk_string.hpp @@ -10,6 +10,7 @@ #include <lib/core/includes.hpp> #include <lib/io/print.hpp> +#include <cstring> namespace ocl { diff --git a/dev/lib/core/error_handler.hpp b/dev/lib/core/error_handler.hpp index 4234721..832f109 100644 --- a/dev/lib/core/error_handler.hpp +++ b/dev/lib/core/error_handler.hpp @@ -2,7 +2,7 @@ * File: core/basic_error_handler.hpp * Purpose: Error handler container. * Author: Amlal El Mahrouss (amlal@nekernel.org) -* Copyright 2025, Amlal El Mahrouss. +* Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License. */ #ifndef _OCL_ERROR_HANDLER_HPP diff --git a/dev/lib/core/includes.hpp b/dev/lib/core/includes.hpp index 78eccd3..a1c6e86 100644 --- a/dev/lib/core/includes.hpp +++ b/dev/lib/core/includes.hpp @@ -2,7 +2,7 @@ * File: core/includes.hpp * Purpose: Core includes for the OCL library. * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #pragma once diff --git a/dev/lib/except/error.hpp b/dev/lib/except/error.hpp index 73e0074..b00a32b 100644 --- a/dev/lib/except/error.hpp +++ b/dev/lib/except/error.hpp @@ -1,7 +1,7 @@ /* * File: opt.hpp * Author: Amlal El Mahrouss, - * Copyright 2023-2025, Amlal El Mahrouss + * Copyright 2023-2025, Amlal El Mahrouss, Licensed under the Boost Software License */ #ifndef _OCL_ERR_HPP diff --git a/dev/lib/fix/fix.hpp b/dev/lib/fix/fix.hpp index d8a3e89..6f02fa1 100644 --- a/dev/lib/fix/fix.hpp +++ b/dev/lib/fix/fix.hpp @@ -2,7 +2,7 @@ * File: fix/fix.hpp * Purpose: Financial Information Exchange parser in C++ * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #ifndef _OCL_FIX_PARSER_HPP diff --git a/dev/lib/logic/equiv.hpp b/dev/lib/logic/equiv.hpp index 704e451..1d16958 100644 --- a/dev/lib/logic/equiv.hpp +++ b/dev/lib/logic/equiv.hpp @@ -2,7 +2,7 @@ * File: equiv.hpp * Purpose: Equivalence runtime c++ header. * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #pragma once @@ -13,8 +13,8 @@ namespace ocl::equiv template <typename T> struct basic_hash_trait { - /// @brief hash from T's result. - static typename T::result hash() + /// @brief hash from T's result_type. + static typename T::result_type hash() { static T val; return val.hash(); @@ -63,9 +63,9 @@ namespace ocl::equiv T left_ = 127, right_ = 127; public: - using result = T; + using result_type = T; - constexpr result hash() + constexpr result_type hash() { return (left_ + right_) < 1; } @@ -79,9 +79,9 @@ namespace ocl::equiv T left_ = 127, right_ = 127; public: - using result = T; + using result_type = T; - constexpr result hash() + constexpr result_type hash() { return (left_ + right_) > 0; } @@ -94,9 +94,9 @@ namespace ocl::equiv T left_ = 5, right_ = 3; public: - using result = T; + using result_type = T; - constexpr result hash() + constexpr result_type hash() { return left_ / right_ == 1; } diff --git a/dev/lib/logic/math.hpp b/dev/lib/logic/math.hpp index e796eae..ce73aa6 100644 --- a/dev/lib/logic/math.hpp +++ b/dev/lib/logic/math.hpp @@ -2,7 +2,7 @@ * File: math.hpp * Purpose: Mathematics c++ header. * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss. + * Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License. */ #pragma once diff --git a/dev/lib/logic/opt.hpp b/dev/lib/logic/opt.hpp index ceee917..19f02df 100644 --- a/dev/lib/logic/opt.hpp +++ b/dev/lib/logic/opt.hpp @@ -1,7 +1,7 @@ /* * File: opt.hpp * Author: Amlal El Mahrouss, - * Copyright 2023-2025, Amlal El Mahrouss + * Copyright 2023-2025, Amlal El Mahrouss, Licensed under the Boost Software License */ #ifndef _OCL_OPT_HPP @@ -120,12 +120,12 @@ namespace ocl return greater_than(std::forward<Lst>(arg)...) ? return_type::okay : return_type::err; } - inline return_type eval_true() + inline return_type eval_true() noexcept { return return_type::okay; } - inline return_type eval_false() + inline return_type eval_false() noexcept { return return_type::err; } diff --git a/dev/lib/memory/allocator_system.hpp b/dev/lib/memory/allocator_system.hpp index 81cd34f..0fe7af3 100644 --- a/dev/lib/memory/allocator_system.hpp +++ b/dev/lib/memory/allocator_system.hpp @@ -2,7 +2,7 @@ * File: core/allocator_system.hpp * Purpose: Allocator System container. * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss. Licensed under the BSL 1.0 license + * Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License. Licensed under the BSL 1.0 license */ #ifndef _OCL_ALLOCATOR_SYSTEM_HPP diff --git a/dev/lib/memory/tracked_ptr.hpp b/dev/lib/memory/tracked_ptr.hpp index bf557d8..0ea0e32 100644 --- a/dev/lib/memory/tracked_ptr.hpp +++ b/dev/lib/memory/tracked_ptr.hpp @@ -2,7 +2,7 @@ * File: memory/tracked_ptr.hpp * Purpose: Custom smart pointer implementation in C++ * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #pragma once diff --git a/dev/lib/net/modem.hpp b/dev/lib/net/modem.hpp index 5bcf3fd..a498f2e 100644 --- a/dev/lib/net/modem.hpp +++ b/dev/lib/net/modem.hpp @@ -2,7 +2,7 @@ * File: net/modem.hpp * Purpose: Modem concept in modern C++ * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #ifndef _OCL_NET_NETWORK_HPP diff --git a/dev/lib/net/url.hpp b/dev/lib/net/url.hpp index e4eca2a..4bbc271 100644 --- a/dev/lib/net/url.hpp +++ b/dev/lib/net/url.hpp @@ -2,7 +2,7 @@ * File: net/url.hpp * Purpose: URL container in modern C++ * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #pragma once @@ -41,17 +41,17 @@ namespace ocl::net if (protocol.starts_with("https://")) { m_protocol_ = url_protocol::https; - this->operator/=(protocol.substr(strlen("https://"))); + this->operator/=(protocol.substr(std::size("https://"))); } else if (protocol.starts_with("http://")) { m_protocol_ = url_protocol::http; - this->operator/=(protocol.substr(strlen("http://"))); + this->operator/=(protocol.substr(std::size("http://"))); } else if (protocol.starts_with("mailto:")) { m_protocol_ = url_protocol::mailto; - this->operator/=(protocol.substr(strlen("mailto:"))); + this->operator/=(protocol.substr(std::size("mailto:"))); } } diff --git a/dev/lib/tests/gtest.hpp b/dev/lib/tests/gtest.hpp index b2e53c9..ee328b0 100644 --- a/dev/lib/tests/gtest.hpp +++ b/dev/lib/tests/gtest.hpp @@ -2,7 +2,7 @@ * File: tests/gtest.hpp * Purpose: Google Test wrapper for the OCL library. * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #pragma once diff --git a/dev/lib/tests/hpptest.hpp b/dev/lib/tests/hpptest.hpp index e32ac85..05f985a 100644 --- a/dev/lib/tests/hpptest.hpp +++ b/dev/lib/tests/hpptest.hpp @@ -2,7 +2,7 @@ * File: tests/hpptest.hpp * Purpose: HPP Test wrapper for the OCL library. * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #pragma once diff --git a/dev/lib/utility/cgi_writer.hpp b/dev/lib/utility/cgi_writer.hpp index 6f59fa5..7b95b2e 100644 --- a/dev/lib/utility/cgi_writer.hpp +++ b/dev/lib/utility/cgi_writer.hpp @@ -1,7 +1,7 @@ /* * File: cgi_writer.hpp * Author: Amlal El Mahrouss, - * Copyright 2023-2025, Amlal El Mahrouss. + * Copyright 2023-2025, Amlal El Mahrouss, Licensed under the Boost Software License. */ #ifndef _OCL_CGI_WRITER_HPP diff --git a/dev/lib/utility/crc32.hpp b/dev/lib/utility/crc32.hpp index ea09b94..2bcab29 100644 --- a/dev/lib/utility/crc32.hpp +++ b/dev/lib/utility/crc32.hpp @@ -2,7 +2,7 @@ * File: crc32.hpp * Purpose: CRC32 module. * Author: Amlal El Mahrouss, - * Copyright 2025, Amlal El Mahrouss. + * Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License. */ #ifndef _OCL_CRC32_HPP diff --git a/dev/lib/utility/embfs.hpp b/dev/lib/utility/embfs.hpp index 6da8874..e2e5d18 100644 --- a/dev/lib/utility/embfs.hpp +++ b/dev/lib/utility/embfs.hpp @@ -2,7 +2,7 @@ * File: embfs.hpp * Purpose: Embedded File System. * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss. + * Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License. */ #ifndef _OCL_EMBFS_HPP diff --git a/dev/tests/chunk_string/CMakeLists.txt b/dev/tests/chunk_string/CMakeLists.txt index 5a4a27c..89d0e4d 100644 --- a/dev/tests/chunk_string/CMakeLists.txt +++ b/dev/tests/chunk_string/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.27) project(BasicChunkUsage LANGUAGES CXX) -find_package(Boost REQUIRED COMPONENTS container) +# find_package(Boost REQUIRED COMPONENTS container) include(FetchContent) FetchContent_Declare( @@ -16,7 +16,7 @@ FetchContent_MakeAvailable(googletest) enable_testing() add_executable(BasicChunkUsage chunk_test.cc) -target_link_libraries(BasicChunkUsage PRIVATE gtest_main Boost::container) +target_link_libraries(BasicChunkUsage PRIVATE gtest_main) set_property(TARGET BasicChunkUsage PROPERTY CXX_STANDARD 20) target_include_directories(BasicChunkUsage PUBLIC ../../) diff --git a/dev/tests/chunk_string/chunk_test.cc b/dev/tests/chunk_string/chunk_test.cc index 7d68ae2..3498fa8 100644 --- a/dev/tests/chunk_string/chunk_test.cc +++ b/dev/tests/chunk_string/chunk_test.cc @@ -2,7 +2,7 @@ * File: tests/chunk_test.cc * Purpose: Chunk unit tests in C++ * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #include <lib/io/print.hpp> @@ -27,5 +27,5 @@ TEST(ChunkTest, BasicChunkUsage) auto end = std::chrono::high_resolution_clock::now(); auto optimized_time = std::chrono::duration_cast<std::chrono::milliseconds>(end - start); - EXPECT_TRUE(optimized_time.count() < limit); + EXPECT_TRUE(optimized_time.count() < 100U); } diff --git a/dev/tests/fix_basic/fix_test.cc b/dev/tests/fix_basic/fix_test.cc index 413dd57..058831b 100644 --- a/dev/tests/fix_basic/fix_test.cc +++ b/dev/tests/fix_basic/fix_test.cc @@ -2,7 +2,7 @@ * File: tests/tracked_ptr_test.cc * Purpose: Custom smart pointer unit tests in C++ * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #include <lib/fix/fix.hpp> diff --git a/dev/tests/network_basic/net_test.cc b/dev/tests/network_basic/net_test.cc index 65da7fd..a40ca5d 100644 --- a/dev/tests/network_basic/net_test.cc +++ b/dev/tests/network_basic/net_test.cc @@ -2,7 +2,7 @@ * File: tests/net_test.cc * Purpose: Network unit tests in C++ * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #include <lib/net/modem.hpp> diff --git a/dev/tests/tracked_ptr_basic/tracked_ptr_test.cc b/dev/tests/tracked_ptr_basic/tracked_ptr_test.cc index 61d4f7d..aa862fd 100644 --- a/dev/tests/tracked_ptr_basic/tracked_ptr_test.cc +++ b/dev/tests/tracked_ptr_basic/tracked_ptr_test.cc @@ -2,7 +2,7 @@ * File: tests/tracked_ptr_test.cc * Purpose: Custom smart pointer unit tests in C++ * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #include <lib/memory/tracked_ptr.hpp> diff --git a/dev/tests/tracked_ptr_leak/tracked_ptr_test.cc b/dev/tests/tracked_ptr_leak/tracked_ptr_test.cc index fb21c34..08c17a1 100644 --- a/dev/tests/tracked_ptr_leak/tracked_ptr_test.cc +++ b/dev/tests/tracked_ptr_leak/tracked_ptr_test.cc @@ -2,7 +2,7 @@ * File: tests/tracked_ptr_test.cc * Purpose: Custom smart pointer unit tests in C++ * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the MIT license. + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. */ #include <lib/memory/tracked_ptr.hpp> |
