From 8119d53ab8822e9dc5dc430524a90a9aa64886f5 Mon Sep 17 00:00:00 2001 From: Sean Parent Date: Wed, 22 Jul 2026 19:49:26 -0700 Subject: [PATCH 01/11] Bump dependencies, clean CMake, small headers update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upgrade dependency versions: cpp-library 5.2.0→5.4.1, copy-on-write 1.1.0→1.1.1, and Boost 1.90.0→1.91.0-1 (updated URL and SHA). Clean up CMake whitespace/formatting and fix Doxygen target configuration spacing. Remove unused #include from adobe/name.hpp and replace with in test/to_string/main.cpp to match usage. --- CMakeLists.txt | 29 +++++++++++++++-------------- adobe/name.hpp | 1 - test/to_string/main.cpp | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 81745ac2..ca8a8105 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,11 +2,12 @@ cmake_minimum_required(VERSION 3.29) include(cmake/CPM.cmake) # Add cpp-library for set version +# [DEPENDENCY] https://github.com/stlab/cpp-library # CPMAddPackage( # NAME cpp-library # SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../cpp-library" # ) -CPMAddPackage("gh:stlab/cpp-library@5.2.0") +CPMAddPackage("gh:stlab/cpp-library@5.4.1") include(${cpp-library_SOURCE_DIR}/cpp-library.cmake) project(adobe-source-libraries CXX) @@ -18,7 +19,7 @@ cpp_library_set_version() include(FindGit) include(CMakeParseArguments) -if (PROJECT_IS_TOP_LEVEL) +if(PROJECT_IS_TOP_LEVEL) include(CTest) endif() @@ -30,7 +31,7 @@ endif() # Dependencies # https://github.com/stlab/copy-on-write/releases -CPMAddPackage("gh:stlab/copy-on-write@1.1.0") +CPMAddPackage("gh:stlab/copy-on-write@1.1.1") # https://github.com/stlab/enum-ops/releases CPMAddPackage(gh:stlab/enum-ops@1.2.0) @@ -50,9 +51,9 @@ set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") # https://github.com/boostorg/boost/releases CPMAddPackage( NAME Boost - VERSION 1.90.0 - URL https://github.com/boostorg/boost/releases/download/boost-1.90.0/boost-1.90.0-cmake.7z - URL_HASH SHA256=218e74c4aa362a994b7b7a23b2920f455a00205c656405fcf262cf60b8871921 + VERSION 1.91.0-1 + URL https://github.com/boostorg/boost/releases/download/boost-1.91.0-1/boost-1.91.0-1-cmake.7z + URL_HASH SHA256=29c7d4f4ac36ad853b6765d03571ea60d90286775df026b4efd9f3281131972b OPTIONS "BOOST_ENABLE_CMAKE ON" "CMAKE_CXX_CLANG_TIDY ;" @@ -85,7 +86,7 @@ option(BUILD_DOCS "Build documentation" OFF) if(BUILD_DOCS) find_package(Doxygen REQUIRED) - + if(DOXYGEN_FOUND) # Download doxygen-awesome-css theme via CPM # https://github.com/jothepro/doxygen-awesome-css @@ -94,11 +95,11 @@ if(BUILD_DOCS) DOWNLOAD_ONLY YES ) set(AWESOME_CSS_DIR ${doxygen-awesome-css_SOURCE_DIR}) - + # Configure Doxyfile set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/documentation/doxyfile.in) set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) - + # Set variables for Doxyfile template set(PROJECT_NAME "Adobe Source Libraries") set(PROJECT_BRIEF "A collection of C++ libraries.") @@ -107,9 +108,9 @@ if(BUILD_DOCS) set(OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}") set(AWESOME_CSS_PATH "${AWESOME_CSS_DIR}") set(CMAKE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") - + configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY) - + # Add custom target for documentation add_custom_target(docs COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT} @@ -117,13 +118,13 @@ if(BUILD_DOCS) COMMENT "Generating API documentation with Doxygen" VERBATIM ) - + # Ensure the output directory exists file(MAKE_DIRECTORY ${OUTPUT_DIR}) - + message(STATUS "Documentation target 'docs' configured") message(STATUS "Run 'cmake --build . --target docs' to generate documentation") else() message(WARNING "Doxygen not found. Documentation will not be built.") endif() -endif() +endif() diff --git a/adobe/name.hpp b/adobe/name.hpp index f2b358a2..d836a54b 100644 --- a/adobe/name.hpp +++ b/adobe/name.hpp @@ -23,7 +23,6 @@ // asl #include -#include /** \defgroup name name_t and static_name_t diff --git a/test/to_string/main.cpp b/test/to_string/main.cpp index 02c6b7c4..991af733 100644 --- a/test/to_string/main.cpp +++ b/test/to_string/main.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #define BOOST_TEST_MAIN From 69b3a0e5e97ffe1c302d07561a1e4eb691653720 Mon Sep 17 00:00:00 2001 From: Sean Parent Date: Wed, 22 Jul 2026 20:37:38 -0700 Subject: [PATCH 02/11] Update Doxygen configuration and improve code comments in istream and md5 sources --- CMakeLists.txt | 76 ++++++++++++++++++++++------------------------ source/istream.cpp | 6 +--- source/md5.cpp | 7 +++-- 3 files changed, 42 insertions(+), 47 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca8a8105..91f5549b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,44 +87,40 @@ option(BUILD_DOCS "Build documentation" OFF) if(BUILD_DOCS) find_package(Doxygen REQUIRED) - if(DOXYGEN_FOUND) - # Download doxygen-awesome-css theme via CPM - # https://github.com/jothepro/doxygen-awesome-css - CPMAddPackage( - URI gh:jothepro/doxygen-awesome-css@2.4.1 - DOWNLOAD_ONLY YES - ) - set(AWESOME_CSS_DIR ${doxygen-awesome-css_SOURCE_DIR}) - - # Configure Doxyfile - set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/documentation/doxyfile.in) - set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) - - # Set variables for Doxyfile template - set(PROJECT_NAME "Adobe Source Libraries") - set(PROJECT_BRIEF "A collection of C++ libraries.") - set(PROJECT_VERSION ${PROJECT_VERSION}) - set(INPUT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") - set(OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}") - set(AWESOME_CSS_PATH "${AWESOME_CSS_DIR}") - set(CMAKE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") - - configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY) - - # Add custom target for documentation - add_custom_target(docs - COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Generating API documentation with Doxygen" - VERBATIM - ) - - # Ensure the output directory exists - file(MAKE_DIRECTORY ${OUTPUT_DIR}) - - message(STATUS "Documentation target 'docs' configured") - message(STATUS "Run 'cmake --build . --target docs' to generate documentation") - else() - message(WARNING "Doxygen not found. Documentation will not be built.") - endif() + # Download doxygen-awesome-css theme via CPM + # https://github.com/jothepro/doxygen-awesome-css + CPMAddPackage( + URI gh:jothepro/doxygen-awesome-css@2.4.2 + DOWNLOAD_ONLY YES + ) + set(AWESOME_CSS_DIR ${doxygen-awesome-css_SOURCE_DIR}) + + # Configure Doxyfile + set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/documentation/doxyfile.in) + set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) + + # Set variables for Doxyfile template + set(PROJECT_NAME "Adobe Source Libraries") + set(PROJECT_BRIEF "A collection of C++ libraries.") + set(PROJECT_VERSION ${PROJECT_VERSION}) + set(INPUT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + set(OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}") + set(AWESOME_CSS_PATH "${AWESOME_CSS_DIR}") + set(CMAKE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + + configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY) + + # Add custom target for documentation + add_custom_target(docs + COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating API documentation with Doxygen" + VERBATIM + ) + + # Ensure the output directory exists + file(MAKE_DIRECTORY ${OUTPUT_DIR}) + + message(STATUS "Documentation target 'docs' configured") + message(STATUS "Run 'cmake --build . --target docs' to generate documentation") endif() diff --git a/source/istream.cpp b/source/istream.cpp index 5591dca5..f9633c34 100644 --- a/source/istream.cpp +++ b/source/istream.cpp @@ -3,14 +3,10 @@ Distributed under the Boost Software License - Version 1.0 (see the accompanying file LICENSE or a copy at https://stlab.github.io/adobe_source_libraries/licenses.html) */ -// $Id: $ -// $DateTime: $ -// $Change: $ -// $Author: $ /**************************************************************************************************/ -#include +#include #include #include #include diff --git a/source/md5.cpp b/source/md5.cpp index 049abe08..488b91b3 100644 --- a/source/md5.cpp +++ b/source/md5.cpp @@ -296,14 +296,17 @@ void md5_t::update(void* input_block, std::size_t input_length) { std::memcpy(&buffer_m[index], input_block, partLen); MD5Transform(state_m, buffer_m); + // input_length is always <= 64 for the padding_s call in final(), so this loop body + // never executes for that call; clang-analyzer can't correlate that bound across the + // call boundary and reports a false positive here. for (i = partLen; i + 63 < input_length; i += 64) - MD5Transform(state_m, &static_cast(input_block)[i]); + MD5Transform(state_m, &static_cast(input_block)[i]); // NOLINT(clang-analyzer-security.ArrayBound) index = 0; } /* Buffer remaining input */ - std::memcpy(&buffer_m[index], &static_cast(input_block)[i], input_length - i); + std::memcpy(&buffer_m[index], &static_cast(input_block)[i], input_length - i); // NOLINT(clang-analyzer-security.ArrayBound) } /**************************************************************************************************/ From da3e2156e1258735cb86196483044ab388dbbea9 Mon Sep 17 00:00:00 2001 From: Sean Parent Date: Thu, 23 Jul 2026 02:11:41 -0700 Subject: [PATCH 03/11] Refactor includes and remove unused headers across multiple source and test files - Removed unnecessary includes from parser_shared.cpp, virtual_machine.cpp, xml_parser.cpp, xstring.cpp, zuid.cpp, and zuid_sys_dep.cpp. - Cleaned up test files by eliminating redundant includes and organizing header files for better readability. - Added NOLINT comments for include cleaner in various test files to maintain code quality. - Improved code consistency and reduced compilation time by streamlining header dependencies. --- .clang-tidy | 8 ++- adobe/algorithm/iota.hpp | 2 - adobe/algorithm/reduce.hpp | 3 +- adobe/array.hpp | 2 +- adobe/dictionary.hpp | 2 +- adobe/enum_ops.hpp | 2 +- adobe/istream.hpp | 2 +- adobe/test/check_less_than_comparable.hpp | 2 +- adobe/test/check_null.hpp | 2 +- adobe/test/check_regular.hpp | 2 +- source/adam.cpp | 42 ++++++----- source/adam_evaluate.cpp | 2 - source/adam_parser.cpp | 15 ++-- source/any_regular.cpp | 4 -- source/eve.cpp | 1 - source/eve_evaluate.cpp | 33 ++++----- source/eve_parser.cpp | 2 +- source/expression_parser.cpp | 17 +---- source/external_model.cpp | 3 - source/future.cpp | 1 - source/iomanip.cpp | 2 - source/iomanip_asl_cel.cpp | 1 - source/lex_stream.cpp | 6 +- source/parser_shared.cpp | 1 - source/virtual_machine.cpp | 6 -- source/xml_parser.cpp | 13 ---- source/xstring.cpp | 2 - source/zuid.cpp | 3 - source/zuid_sys_dep.cpp | 5 +- test/algorithm/clamp/clamp_test.cpp | 3 +- test/algorithm/median/median_test.cpp | 2 +- test/algorithm/minmax/minmax_test.cpp | 2 +- test/algorithm/select/select_test.cpp | 5 +- .../any_regular_serialization_test.cpp | 7 +- test/any_regular/any_regular_test.cpp | 7 +- test/arg_stream/arg_stream_test.cpp | 4 +- test/closed_hash/main.cpp | 5 +- test/cmath/main.cpp | 4 +- test/conversion/conversion_test.cpp | 7 +- test/copy_on_write/cow_test.cpp | 5 +- test/enum_ops/enum_ops_test.cpp | 4 +- test/enum_ops/fail_assign_test.cpp | 2 +- test/equal_range/equal_range_test.cpp | 6 +- test/erase/erase_test.cpp | 11 ++- test/eve_smoke/main.cpp | 11 ++- .../expression_parser_test.cpp | 2 +- test/fnv/main.cpp | 2 +- test/forest/forest_test.cpp | 5 +- test/forest_smoke/main.cpp | 5 +- test/functional/functional_test.cpp | 4 +- test/json/any_json_helper.cpp | 3 +- test/json/asl_json_helper.cpp | 2 +- test/lex_stream/lex_stream_test.cpp | 3 +- test/lower_bound/lower_bound_test.cpp | 7 +- test/n_queens/main.cpp | 1 - test/name/fail_int_test.cpp | 2 +- test/name/name_test.cpp | 4 +- test/name/smoke.cpp | 5 +- test/poly/poly_test.cpp | 4 +- test/property_model_eval/adam_test_parser.cpp | 3 - test/property_model_eval/pmeval.cpp | 12 ++-- test/reduction/main.cpp | 4 +- test/selection/main.cpp | 10 +-- test/serializable/serializable.cpp | 2 +- test/serialization/main.cpp | 1 - test/sha/bench.cpp | 4 -- test/sha/main.cpp | 69 ++++++++----------- test/sha/shavs.cpp | 4 +- test/stable_partition_selection/main.cpp | 28 ++------ test/to_string/main.cpp | 6 +- test/virtual_machine/virtual_machine_test.cpp | 2 +- test/xml_parser/main.cpp | 2 - test/zuidgen/main.cpp | 5 +- 73 files changed, 161 insertions(+), 311 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index f60382d5..29a30133 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,10 @@ --- +Checks: > + clang-diagnostic-*, + clang-analyzer-*, + misc-include-cleaner +CheckOptions: + misc-include-cleaner.MissingIncludes: false SystemHeaders: false -HeaderFilterRegex: '^(?!.*(boost|_deps)).*$' +HeaderFilterRegex: "^(?!.*(boost|_deps)).*$" FormatStyle: none diff --git a/adobe/algorithm/iota.hpp b/adobe/algorithm/iota.hpp index 730a33f5..e1b471d4 100644 --- a/adobe/algorithm/iota.hpp +++ b/adobe/algorithm/iota.hpp @@ -15,8 +15,6 @@ #include #include -#include - /**************************************************************************************************/ namespace adobe { diff --git a/adobe/algorithm/reduce.hpp b/adobe/algorithm/reduce.hpp index a5daad6d..f92eb7fe 100644 --- a/adobe/algorithm/reduce.hpp +++ b/adobe/algorithm/reduce.hpp @@ -10,13 +10,12 @@ #include +#include #include #include #include #include -#include -#include #include /**************************************************************************************************/ diff --git a/adobe/array.hpp b/adobe/array.hpp index 803afa78..b52c633d 100644 --- a/adobe/array.hpp +++ b/adobe/array.hpp @@ -10,7 +10,7 @@ #include -#include +#include // IWYU pragma: export #include diff --git a/adobe/dictionary.hpp b/adobe/dictionary.hpp index ded95b82..bcf57219 100644 --- a/adobe/dictionary.hpp +++ b/adobe/dictionary.hpp @@ -12,7 +12,7 @@ #include -#include +#include // IWYU pragma: export #include diff --git a/adobe/enum_ops.hpp b/adobe/enum_ops.hpp index fb05f1e8..51b52221 100644 --- a/adobe/enum_ops.hpp +++ b/adobe/enum_ops.hpp @@ -8,7 +8,7 @@ #ifndef ADOBE_ENUM_OPS_HPP #define ADOBE_ENUM_OPS_HPP -#include +#include // IWYU pragma: export /**************************************************************************************************/ diff --git a/adobe/istream.hpp b/adobe/istream.hpp index b96f2f4d..62b114f1 100644 --- a/adobe/istream.hpp +++ b/adobe/istream.hpp @@ -16,7 +16,7 @@ #include #include -#include +#include // IWYU pragma: export #include /**************************************************************************************************/ diff --git a/adobe/test/check_less_than_comparable.hpp b/adobe/test/check_less_than_comparable.hpp index 78bf7a97..eb104984 100644 --- a/adobe/test/check_less_than_comparable.hpp +++ b/adobe/test/check_less_than_comparable.hpp @@ -7,7 +7,7 @@ #include #include -#include +#include // NOLINT(misc-include-cleaner) namespace adobe { diff --git a/adobe/test/check_null.hpp b/adobe/test/check_null.hpp index 2a7a62a2..dc926470 100644 --- a/adobe/test/check_null.hpp +++ b/adobe/test/check_null.hpp @@ -6,7 +6,7 @@ /**************************************************************************************************/ #include -#include +#include // NOLINT(misc-include-cleaner) namespace adobe { /*! diff --git a/adobe/test/check_regular.hpp b/adobe/test/check_regular.hpp index 1f43e9a0..ecb12cf8 100644 --- a/adobe/test/check_regular.hpp +++ b/adobe/test/check_regular.hpp @@ -7,7 +7,7 @@ #include #include -#include +#include // NOLINT(misc-include-cleaner) namespace adobe { /*! diff --git a/source/adam.cpp b/source/adam.cpp index 8cf8e39e..ca7cd202 100644 --- a/source/adam.cpp +++ b/source/adam.cpp @@ -18,10 +18,8 @@ #include #include #include -#include #include #include -#include #include #include @@ -764,11 +762,12 @@ void sheet_t::implementation_t::add_interface(name_t name, bool linked, scope_value_t scope(initialize_mode_m, true); if (initializer_expression.size()) { - cell_set_m.push_back(cell_t(name, linked, - [position1, initializer_expression, this]() { - return calculate_expression(position1, initializer_expression); - }, - cell_set_m.size())); + cell_set_m.push_back(cell_t( + name, linked, + [position1, initializer_expression, this]() { + return calculate_expression(position1, initializer_expression); + }, + cell_set_m.size())); } else { cell_set_m.push_back(cell_t(name, linked, cell_t::calculator_t(), cell_set_m.size())); } @@ -781,15 +780,14 @@ void sheet_t::implementation_t::add_interface(name_t name, bool linked, if (expression.size()) { // REVISIT (sparent) : Non-transactional on failure. - cell_set_m.push_back(cell_t(access_interface_output, name, - [position2, expression, this]() { - return calculate_expression(position2, expression); - }, - cell_set_m.size(), &cell_set_m.back())); + cell_set_m.push_back(cell_t( + access_interface_output, name, + [position2, expression, this]() { return calculate_expression(position2, expression); }, + cell_set_m.size(), &cell_set_m.back())); } else { - cell_set_m.push_back(cell_t(access_interface_output, name, - [name, this]() { return get(name); }, - cell_set_m.size(), &cell_set_m.back())); + cell_set_m.push_back(cell_t( + access_interface_output, name, [name, this]() { return get(name); }, cell_set_m.size(), + &cell_set_m.back())); } output_index_m.insert(cell_set_m.back()); @@ -811,9 +809,9 @@ void sheet_t::implementation_t::add_interface(name_t name, any_regular_t initial cell.state_m = std::move(initial); cell.priority_m = ++priority_high_m; - cell_set_m.push_back(cell_t(access_interface_output, name, - [name, this]() { return get(name); }, - cell_set_m.size(), &cell)); + cell_set_m.push_back(cell_t( + access_interface_output, name, [name, this]() { return get(name); }, cell_set_m.size(), + &cell)); output_index_m.insert(cell_set_m.back()); @@ -955,10 +953,10 @@ sheet_t::connection_t sheet_t::implementation_t::monitor_enabled(name_t n, const monitor(active_m.test(iter->cell_set_pos_m) || (value_accessed_m.test(iter->cell_set_pos_m) && (touch_set & priority_accessed_m).any())); - return monitor_enabled_m.connect( - [touch_set, iter_pos = iter->cell_set_pos_m, monitor, this](const cell_bits_t& a, const cell_bits_t& b) { - enabled_filter(touch_set, iter_pos, monitor, a, b); - }); + return monitor_enabled_m.connect([touch_set, iter_pos = iter->cell_set_pos_m, monitor, + this](const cell_bits_t& a, const cell_bits_t& b) { + enabled_filter(touch_set, iter_pos, monitor, a, b); + }); } /**************************************************************************************************/ diff --git a/source/adam_evaluate.cpp b/source/adam_evaluate.cpp index 831a023a..b92c79e4 100644 --- a/source/adam_evaluate.cpp +++ b/source/adam_evaluate.cpp @@ -7,8 +7,6 @@ #include #include -#include -#include #include /**************************************************************************************************/ diff --git a/source/adam_parser.cpp b/source/adam_parser.cpp index fc792203..7d04c03f 100644 --- a/source/adam_parser.cpp +++ b/source/adam_parser.cpp @@ -7,22 +7,21 @@ #include + #include #include -#include #include #include -#include -#include -#include -#include -#include -#include +#include #include -#include #include + +#ifndef NDEBUG +#include +#endif + #include /**************************************************************************************************/ diff --git a/source/any_regular.cpp b/source/any_regular.cpp index 47a851a3..ace4fccf 100644 --- a/source/any_regular.cpp +++ b/source/any_regular.cpp @@ -11,13 +11,9 @@ #include -#include -#include -#include #include #include #include -#include #include #include diff --git a/source/eve.cpp b/source/eve.cpp index c111839e..c3a2a180 100644 --- a/source/eve.cpp +++ b/source/eve.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #ifndef NDEBUG diff --git a/source/eve_evaluate.cpp b/source/eve_evaluate.cpp index 202f9e6f..8123d81f 100644 --- a/source/eve_evaluate.cpp +++ b/source/eve_evaluate.cpp @@ -12,13 +12,10 @@ #include #include -#include #include #include #include -#include #include -#include #include /**************************************************************************************************/ @@ -200,24 +197,23 @@ eve_callback_suite_t bind_layout(const bind_layout_proc_t& proc, sheet_t& sheet, eve_callback_suite_t suite; suite.add_view_proc_m = - [&evaluator, proc](const eve_callback_suite_t::position_t& parent, const line_position_t& /* parse_location */, - name_t name, const array_t& parameters, const std::string& /* brief */, - const std::string& /* detailed */) -> eve_callback_suite_t::position_t { + [&evaluator, proc](const eve_callback_suite_t::position_t& parent, + const line_position_t& /* parse_location */, name_t name, + const array_t& parameters, const std::string& /* brief */, + const std::string& /* detailed */) -> eve_callback_suite_t::position_t { return proc(parent, name, evaluate_named_arguments(evaluator, parameters)); }; - suite.add_cell_proc_m = - [&sheet](adobe::eve_callback_suite_t::cell_type_t type, - adobe::name_t name, const adobe::line_position_t& position, - const adobe::array_t& init_or_expr, - const std::string& /* brief */, const std::string& /* detailed */) -> void { + suite.add_cell_proc_m = + [&sheet](adobe::eve_callback_suite_t::cell_type_t type, adobe::name_t name, + const adobe::line_position_t& position, const adobe::array_t& init_or_expr, + const std::string& /* brief */, const std::string& /* detailed */) -> void { add_cell(sheet, type, name, position, init_or_expr); }; suite.add_relation_proc_m = - [&sheet](const adobe::line_position_t& position, - const adobe::array_t& conditional, - const adobe::eve_callback_suite_t::relation_t* first, - const adobe::eve_callback_suite_t::relation_t* last, - const std::string& /* brief */, const std::string& /* detailed */) -> void { + [&sheet](const adobe::line_position_t& position, const adobe::array_t& conditional, + const adobe::eve_callback_suite_t::relation_t* first, + const adobe::eve_callback_suite_t::relation_t* last, + const std::string& /* brief */, const std::string& /* detailed */) -> void { add_relation(sheet, position, conditional, first, last); }; suite.add_interface_proc_m = @@ -227,10 +223,7 @@ eve_callback_suite_t bind_layout(const bind_layout_proc_t& proc, sheet_t& sheet, const std::string& /* detailed */) -> void { sheet.add_interface(name, linked, position1, initializer, position2, expression); }; - suite.finalize_sheet_proc_m = - [&sheet]() -> void { - sheet.update(); - }; + suite.finalize_sheet_proc_m = [&sheet]() -> void { sheet.update(); }; return suite; } diff --git a/source/eve_parser.cpp b/source/eve_parser.cpp index fc95c0a7..9c653991 100644 --- a/source/eve_parser.cpp +++ b/source/eve_parser.cpp @@ -9,7 +9,6 @@ #include #include -#include #include #include #include @@ -19,6 +18,7 @@ #include #include + #include /**************************************************************************************************/ diff --git a/source/expression_parser.cpp b/source/expression_parser.cpp index cda37c44..c0ab66d2 100644 --- a/source/expression_parser.cpp +++ b/source/expression_parser.cpp @@ -14,35 +14,20 @@ with regards to state. #include #include -#include -#include #include #include -#include #include -#include - #include #include #include +#include #include -#include -#include #include #include #include -#ifdef BOOST_MSVC -namespace std { -using ::isalnum; -using ::isalpha; -using ::isdigit; -using ::isspace; -} // namespace std -#endif - using namespace std; using namespace adobe; diff --git a/source/external_model.cpp b/source/external_model.cpp index 3e833e84..bb69522b 100644 --- a/source/external_model.cpp +++ b/source/external_model.cpp @@ -10,9 +10,6 @@ #include #include -#include -#include - using namespace std; /**************************************************************************************************/ diff --git a/source/future.cpp b/source/future.cpp index 398e13ab..bb34515c 100644 --- a/source/future.cpp +++ b/source/future.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include using namespace std; diff --git a/source/iomanip.cpp b/source/iomanip.cpp index 5f336217..eb93494e 100644 --- a/source/iomanip.cpp +++ b/source/iomanip.cpp @@ -11,8 +11,6 @@ #include -#include - /**************************************************************************************************/ namespace adobe { diff --git a/source/iomanip_asl_cel.cpp b/source/iomanip_asl_cel.cpp index 83307997..a75c6131 100644 --- a/source/iomanip_asl_cel.cpp +++ b/source/iomanip_asl_cel.cpp @@ -15,7 +15,6 @@ #include #include #include -#include using namespace std; diff --git a/source/lex_stream.cpp b/source/lex_stream.cpp index 3288cb97..a9d91d99 100644 --- a/source/lex_stream.cpp +++ b/source/lex_stream.cpp @@ -13,13 +13,10 @@ #include #include -#include #include #include #include #include -#include -#include /**************************************************************************************************/ @@ -326,8 +323,7 @@ void lex_stream_t::set_comment_bypass(bool bypass) { return object_m->set_commen /**************************************************************************************************/ lex_stream_t::implementation_t::implementation_t(std::istream& in, const line_position_t& position) - : _super(std::istreambuf_iterator(in), std::istreambuf_iterator(), - position), + : _super(std::istreambuf_iterator(in), std::istreambuf_iterator(), position), comment_bypass_m(false) { _super::set_parse_token_proc( diff --git a/source/parser_shared.cpp b/source/parser_shared.cpp index cfbed05f..526d1eff 100644 --- a/source/parser_shared.cpp +++ b/source/parser_shared.cpp @@ -9,7 +9,6 @@ #include #include -#include using namespace std; diff --git a/source/virtual_machine.cpp b/source/virtual_machine.cpp index a3d0c640..11336415 100644 --- a/source/virtual_machine.cpp +++ b/source/virtual_machine.cpp @@ -6,27 +6,21 @@ /**************************************************************************************************/ #include -#include #include -#include #include #include -#include #include #include #include #include -#include #include #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/source/xml_parser.cpp b/source/xml_parser.cpp index fa1fd5af..d3b7709b 100644 --- a/source/xml_parser.cpp +++ b/source/xml_parser.cpp @@ -5,26 +5,13 @@ */ /**************************************************************************************************/ -#include - #include #include -#include - #include /**************************************************************************************************/ -#ifdef BOOST_MSVC -namespace std { -using ::isdigit; -using ::isxdigit; -} // namespace std -#endif - -/**************************************************************************************************/ - namespace { /**************************************************************************************************/ diff --git a/source/xstring.cpp b/source/xstring.cpp index c21ca5f8..c9851653 100644 --- a/source/xstring.cpp +++ b/source/xstring.cpp @@ -13,8 +13,6 @@ #include #include -#include -#include #include #include #include diff --git a/source/zuid.cpp b/source/zuid.cpp index 5b5e8db3..2003b61c 100644 --- a/source/zuid.cpp +++ b/source/zuid.cpp @@ -6,8 +6,6 @@ /**************************************************************************************************/ -#include -#include #include #include #include @@ -15,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/source/zuid_sys_dep.cpp b/source/zuid_sys_dep.cpp index 42445cc2..b4cb6913 100644 --- a/source/zuid_sys_dep.cpp +++ b/source/zuid_sys_dep.cpp @@ -17,9 +17,6 @@ #include #include -#if ADOBE_PLATFORM_WIN -#include -#endif #if defined(BOOST_MSVC) #pragma warning(push) @@ -27,7 +24,7 @@ #pragma warning(disable : 4996) // c runtime library deprecated function warning #endif -#include +#include // NOLINT(misc-include-cleaner) #if defined(BOOST_MSVC) #pragma warning(pop) diff --git a/test/algorithm/clamp/clamp_test.cpp b/test/algorithm/clamp/clamp_test.cpp index 88cbfbc2..c4b6415c 100644 --- a/test/algorithm/clamp/clamp_test.cpp +++ b/test/algorithm/clamp/clamp_test.cpp @@ -6,11 +6,10 @@ /**************************************************************************************************/ #include -#include #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) BOOST_AUTO_TEST_CASE(clamp_test) { using adobe::clamp; diff --git a/test/algorithm/median/median_test.cpp b/test/algorithm/median/median_test.cpp index 50e52bc6..8ac8eff1 100644 --- a/test/algorithm/median/median_test.cpp +++ b/test/algorithm/median/median_test.cpp @@ -9,7 +9,7 @@ #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) BOOST_AUTO_TEST_CASE(median_test) { using adobe::median; diff --git a/test/algorithm/minmax/minmax_test.cpp b/test/algorithm/minmax/minmax_test.cpp index 14c34f0b..e670efcc 100644 --- a/test/algorithm/minmax/minmax_test.cpp +++ b/test/algorithm/minmax/minmax_test.cpp @@ -9,7 +9,7 @@ #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) struct test_t { bool before(const test_t&) const { return false; } diff --git a/test/algorithm/select/select_test.cpp b/test/algorithm/select/select_test.cpp index f0a20ab4..2892f2a9 100644 --- a/test/algorithm/select/select_test.cpp +++ b/test/algorithm/select/select_test.cpp @@ -7,10 +7,13 @@ #include +#include + #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) BOOST_AUTO_TEST_CASE(select_test) { + adobe::select_0_2(10, 5, std::less<>()); /* PLACEHOLDER - Currently select.hpp is well tested by median and clamp. */ } diff --git a/test/any_regular/any_regular_serialization_test.cpp b/test/any_regular/any_regular_serialization_test.cpp index 8e4ae168..39db6c89 100644 --- a/test/any_regular/any_regular_serialization_test.cpp +++ b/test/any_regular/any_regular_serialization_test.cpp @@ -5,13 +5,8 @@ */ /**************************************************************************************************/ -#include - -#include -#include - #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) #include diff --git a/test/any_regular/any_regular_test.cpp b/test/any_regular/any_regular_test.cpp index 5d731380..9ce7a0ce 100644 --- a/test/any_regular/any_regular_test.cpp +++ b/test/any_regular/any_regular_test.cpp @@ -5,13 +5,8 @@ */ /**************************************************************************************************/ -#include - -#include -#include - #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) #include diff --git a/test/arg_stream/arg_stream_test.cpp b/test/arg_stream/arg_stream_test.cpp index a3553542..21b4bf4a 100644 --- a/test/arg_stream/arg_stream_test.cpp +++ b/test/arg_stream/arg_stream_test.cpp @@ -9,11 +9,9 @@ // asl #include -#include - // boost #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) // std #include diff --git a/test/closed_hash/main.cpp b/test/closed_hash/main.cpp index 4e6d3824..31ced442 100644 --- a/test/closed_hash/main.cpp +++ b/test/closed_hash/main.cpp @@ -13,10 +13,7 @@ #include #include -#include -#include -#include -#include +#include // NOLINT(misc-include-cleaner) // NOLINT(misc-inlucde-cleaner) #include diff --git a/test/cmath/main.cpp b/test/cmath/main.cpp index ffb2745c..7388eacf 100644 --- a/test/cmath/main.cpp +++ b/test/cmath/main.cpp @@ -10,7 +10,9 @@ #include -#include +#include +#include + /**************************************************************************************************/ diff --git a/test/conversion/conversion_test.cpp b/test/conversion/conversion_test.cpp index b52f3ca8..fffd3354 100644 --- a/test/conversion/conversion_test.cpp +++ b/test/conversion/conversion_test.cpp @@ -5,13 +5,8 @@ */ /**************************************************************************************************/ -#include - -#include -#include - #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) #include diff --git a/test/copy_on_write/cow_test.cpp b/test/copy_on_write/cow_test.cpp index ec1fdd8f..0cfb5e10 100644 --- a/test/copy_on_write/cow_test.cpp +++ b/test/copy_on_write/cow_test.cpp @@ -5,8 +5,6 @@ */ /**************************************************************************************************/ -#include - #include #include #include @@ -16,10 +14,9 @@ #include #include #include -#include +#include // NOLINT(misc-include-cleaner) #include -#include namespace { diff --git a/test/enum_ops/enum_ops_test.cpp b/test/enum_ops/enum_ops_test.cpp index 79cd9f79..b2b24448 100644 --- a/test/enum_ops/enum_ops_test.cpp +++ b/test/enum_ops/enum_ops_test.cpp @@ -5,11 +5,9 @@ */ /**************************************************************************************************/ -#include - #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) #include diff --git a/test/enum_ops/fail_assign_test.cpp b/test/enum_ops/fail_assign_test.cpp index cde4de71..c37b635b 100644 --- a/test/enum_ops/fail_assign_test.cpp +++ b/test/enum_ops/fail_assign_test.cpp @@ -9,7 +9,7 @@ #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) #include diff --git a/test/equal_range/equal_range_test.cpp b/test/equal_range/equal_range_test.cpp index 3b5b52e5..a95e5270 100644 --- a/test/equal_range/equal_range_test.cpp +++ b/test/equal_range/equal_range_test.cpp @@ -5,16 +5,12 @@ */ /**************************************************************************************************/ -#include - -#include #include #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) #include -#include #include #include #include diff --git a/test/erase/erase_test.cpp b/test/erase/erase_test.cpp index d5eb545b..016deaa3 100644 --- a/test/erase/erase_test.cpp +++ b/test/erase/erase_test.cpp @@ -11,7 +11,6 @@ #include #include -#include #include #include #include @@ -20,15 +19,13 @@ #include #include #include -#include -#include -#include -#include +#include // NOLINT(misc-include-cleaner) #include #include -#include -#include +#include + + /**************************************************************************************************/ diff --git a/test/eve_smoke/main.cpp b/test/eve_smoke/main.cpp index 6a14244a..9dfaee5c 100644 --- a/test/eve_smoke/main.cpp +++ b/test/eve_smoke/main.cpp @@ -13,8 +13,6 @@ #include #include -#include -#include #include #include #include @@ -77,14 +75,16 @@ void test_print_debug() { adobe::poly_placeable_t placeable_leaf{my_leaf()}; - eve.add_placeable(adobe::eve_t::iterator(), adobe::layout_attributes_t(), false, placeable_leaf, false); + eve.add_placeable(adobe::eve_t::iterator(), adobe::layout_attributes_t(), false, placeable_leaf, + false); eve.print_debug(result); // The exact string cannot be checked for because the name of the type // will vary from compiler to compiler. Even so, we can ensure the attribute // value are correct and in the right order. - if (result.str().find("(left: 0, top: 0, width: 0, height: 0, horizontal: default, vertical: default, placement: leaf);") == std::string::npos) { + if (result.str().find("(left: 0, top: 0, width: 0, height: 0, horizontal: default, vertical: " + "default, placement: leaf);") == std::string::npos) { fail_test(); } } @@ -125,8 +125,7 @@ void testParse(std::filesystem::path& fileName) { adobe::copy_utf(native_path.begin(), native_path.end(), std::back_inserter(path)); adobe::parse( - stream, adobe::line_position_t(path.c_str()), - adobe::eve_callback_suite_t::position_t(), + stream, adobe::line_position_t(path.c_str()), adobe::eve_callback_suite_t::position_t(), adobe::bind_layout(std::bind(&assemble, _2, _3), layout_sheet, layout_sheet.machine_m)); } diff --git a/test/expression_parser/expression_parser_test.cpp b/test/expression_parser/expression_parser_test.cpp index 4bafcdf5..e1acb18c 100644 --- a/test/expression_parser/expression_parser_test.cpp +++ b/test/expression_parser/expression_parser_test.cpp @@ -8,7 +8,7 @@ #include #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) #include diff --git a/test/fnv/main.cpp b/test/fnv/main.cpp index 4d2c3269..3c23fbbe 100644 --- a/test/fnv/main.cpp +++ b/test/fnv/main.cpp @@ -13,7 +13,7 @@ #define BOOST_TEST_MAIN // boost -#include +#include // NOLINT(misc-include-cleaner) // asl #include diff --git a/test/forest/forest_test.cpp b/test/forest/forest_test.cpp index 985be6ed..952671d1 100644 --- a/test/forest/forest_test.cpp +++ b/test/forest/forest_test.cpp @@ -6,12 +6,9 @@ /**************************************************************************************************/ -#include - #define BOOST_TEST_MAIN -#include -#include +#include // NOLINT(misc-include-cleaner) #include #include diff --git a/test/forest_smoke/main.cpp b/test/forest_smoke/main.cpp index b1a054bb..cfd0b803 100644 --- a/test/forest_smoke/main.cpp +++ b/test/forest_smoke/main.cpp @@ -6,12 +6,9 @@ #include #include -#include -#include -#include +#include #include -#include template // R is a depth adaptor range void output(const R& f) { diff --git a/test/functional/functional_test.cpp b/test/functional/functional_test.cpp index bc2bae4f..9f6f9594 100644 --- a/test/functional/functional_test.cpp +++ b/test/functional/functional_test.cpp @@ -7,14 +7,12 @@ #include // file be tested included first -#include - #include #define BOOST_TEST_MAIN // boost -#include +#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) /**************************************************************************************************/ diff --git a/test/json/any_json_helper.cpp b/test/json/any_json_helper.cpp index fed23e49..60469185 100644 --- a/test/json/any_json_helper.cpp +++ b/test/json/any_json_helper.cpp @@ -15,10 +15,9 @@ #define BOOST_TEST_MAIN // boost -#include +#include // NOLINT(misc-include-cleaner) // asl -#include #include #include #include diff --git a/test/json/asl_json_helper.cpp b/test/json/asl_json_helper.cpp index 91f13042..b139989e 100644 --- a/test/json/asl_json_helper.cpp +++ b/test/json/asl_json_helper.cpp @@ -12,7 +12,7 @@ #include // boost -#include +#include // NOLINT(misc-include-cleaner) // asl #include diff --git a/test/lex_stream/lex_stream_test.cpp b/test/lex_stream/lex_stream_test.cpp index bae57a57..33c62963 100644 --- a/test/lex_stream/lex_stream_test.cpp +++ b/test/lex_stream/lex_stream_test.cpp @@ -8,9 +8,8 @@ #include #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) -#include "lex_stream_test.h" #include /**************************************************************************************************/ diff --git a/test/lower_bound/lower_bound_test.cpp b/test/lower_bound/lower_bound_test.cpp index c1f1e4f6..8f498b5b 100644 --- a/test/lower_bound/lower_bound_test.cpp +++ b/test/lower_bound/lower_bound_test.cpp @@ -5,16 +5,13 @@ */ /**************************************************************************************************/ -#include - -#include #include #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) #include -#include +#include #include #include #include diff --git a/test/n_queens/main.cpp b/test/n_queens/main.cpp index 9179c3d8..4ce139b8 100644 --- a/test/n_queens/main.cpp +++ b/test/n_queens/main.cpp @@ -5,7 +5,6 @@ */ /**************************************************************************************************/ -#include #include #include diff --git a/test/name/fail_int_test.cpp b/test/name/fail_int_test.cpp index a60c068e..3317c4ba 100644 --- a/test/name/fail_int_test.cpp +++ b/test/name/fail_int_test.cpp @@ -9,7 +9,7 @@ #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) #include #include diff --git a/test/name/name_test.cpp b/test/name/name_test.cpp index da24e1a5..7979c9fb 100644 --- a/test/name/name_test.cpp +++ b/test/name/name_test.cpp @@ -5,8 +5,6 @@ */ /**************************************************************************************************/ -#include - #include #include @@ -14,7 +12,7 @@ #include #include #include -#include +#include // NOLINT(misc-include-cleaner) #include diff --git a/test/name/smoke.cpp b/test/name/smoke.cpp index 72924c47..3e77e0ea 100644 --- a/test/name/smoke.cpp +++ b/test/name/smoke.cpp @@ -6,9 +6,6 @@ /**************************************************************************************************/ -// config -#include - // stdc++ #include #include @@ -18,7 +15,7 @@ #define BOOST_TEST_MAIN // boost -#include +#include // NOLINT(misc-include-cleaner) // asl #include diff --git a/test/poly/poly_test.cpp b/test/poly/poly_test.cpp index 3ca1faea..a22f62db 100644 --- a/test/poly/poly_test.cpp +++ b/test/poly/poly_test.cpp @@ -6,14 +6,12 @@ /**************************************************************************************************/ -#include - #define BOOST_TEST_MAIN #include #include -#include +#include // NOLINT(misc-include-cleaner) #include #include diff --git a/test/property_model_eval/adam_test_parser.cpp b/test/property_model_eval/adam_test_parser.cpp index af8a8d43..bdcdaea7 100644 --- a/test/property_model_eval/adam_test_parser.cpp +++ b/test/property_model_eval/adam_test_parser.cpp @@ -15,11 +15,8 @@ #include #include "iomanip_flat.hpp" -#include -#include #include #include -#include /**************************************************************************************************/ diff --git a/test/property_model_eval/pmeval.cpp b/test/property_model_eval/pmeval.cpp index 37bb8758..b9f82cb2 100644 --- a/test/property_model_eval/pmeval.cpp +++ b/test/property_model_eval/pmeval.cpp @@ -9,12 +9,16 @@ #include #include -#include +#include -#include +// #include -#include -#include +#include +#include +#include +#include + +#include #include #include "adam_test_parser.hpp" diff --git a/test/reduction/main.cpp b/test/reduction/main.cpp index 1942c855..c74a689f 100644 --- a/test/reduction/main.cpp +++ b/test/reduction/main.cpp @@ -5,12 +5,14 @@ */ /**************************************************************************************************/ -#include +#include +#include #include #include #include #include + #include #include diff --git a/test/selection/main.cpp b/test/selection/main.cpp index cb380c66..437f647e 100644 --- a/test/selection/main.cpp +++ b/test/selection/main.cpp @@ -5,17 +5,19 @@ */ /**************************************************************************************************/ -#include - -#include #include #include #include #include -#include #include +#include +#include +#include + +#include + /**************************************************************************************************/ namespace { diff --git a/test/serializable/serializable.cpp b/test/serializable/serializable.cpp index e522aa64..de391a04 100644 --- a/test/serializable/serializable.cpp +++ b/test/serializable/serializable.cpp @@ -7,7 +7,7 @@ #include -#include +#include // NOLINT(misc-include-cleaner) #include #include diff --git a/test/serialization/main.cpp b/test/serialization/main.cpp index 18887a99..7d443966 100644 --- a/test/serialization/main.cpp +++ b/test/serialization/main.cpp @@ -14,7 +14,6 @@ #include #include #include -#include struct unknown_type_t {}; diff --git a/test/sha/bench.cpp b/test/sha/bench.cpp index 15874913..c84933d1 100644 --- a/test/sha/bench.cpp +++ b/test/sha/bench.cpp @@ -6,12 +6,8 @@ /**************************************************************************************************/ -// config -#include - // stdc++ #include -#include #ifndef USING_OPENSSL #define USING_OPENSSL 0 diff --git a/test/sha/main.cpp b/test/sha/main.cpp index 85e4bf2a..fd90d40b 100644 --- a/test/sha/main.cpp +++ b/test/sha/main.cpp @@ -11,14 +11,10 @@ #define BOOST_TEST_MAIN // boost -#include +#include // NOLINT(misc-include-cleaner) // asl -#include -#include -#include #include -#include #include /**************************************************************************************************/ @@ -296,8 +292,7 @@ BOOST_AUTO_TEST_CASE(sha) { "\x49\x9c\xbd\x7c\x88\x7a\x94\xea\xaa\x10\x1e\xa5\xaa\xbc\x52\x9b\x4e\x7e\x43\x66\x5a\x5a" "\xf2\xcd\x03\xfe\x67\x8e\xa6\xa5\x00\x5b\xba\x3b\x08\x22\x04\xc2\x8b\x91\x09\xf4\x69\xda" "\xc9\x2a\xaa\xb3\xaa\x7c\x11\xa1\xb3\x2a\xe0", - 611, "8c5b2a5d dae5a97f c7f9d856 61c672ad bf7933d4"} - }; + 611, "8c5b2a5d dae5a97f c7f9d856 61c672ad bf7933d4"}}; test_hash(sha1_test_set); @@ -317,8 +312,7 @@ BOOST_AUTO_TEST_CASE(sha) { "\x11\x6c\xd4\xa4\xc9\x87\xfc\x06\x57\x00\x64\x91\xb1\x49\xcc\xd4\xb5\x11\x30\xac\x62\xb1" "\x9d\xc2\x48\xc7\x44\x54\x3d\x20\xcd\x39\x52\xdc\xed\x1f\x06\xcc\x3b\x18\xb9\x1f\x3f\x55" "\x63\x3e\xcc\x30\x85\xf4\x90\x70\x60\xd2\xe0", - 611, "54bea6ea b8195a2e b0a7906a 4b4a8766 66300eef bd1f3b84 74f9cd57"} - }; + 611, "54bea6ea b8195a2e b0a7906a 4b4a8766 66300eef bd1f3b84 74f9cd57"}}; test_hash(sha224_test_set); @@ -338,44 +332,40 @@ BOOST_AUTO_TEST_CASE(sha) { "\x58\xa3\xe2\xf3\xc0\x07\x16\x6e\x49\xc1\x2e\x9b\xa3\x4c\x01\x04\x06\x91\x29\xea\x76\x15" "\x64\x25\x45\x70\x3a\x2b\xd9\x01\xe1\x6e\xb0\xe0\x5d\xeb\xa0\x14\xeb\xff\x64\x06\xa0\x7d" "\x54\x36\x4e\xff\x74\x2d\xa7\x79\xb0\xb3\xa0", - 611, "3e9ad646 8bbbad2a c3c2cdc2 92e018ba 5fd70b96 0cf16797 77fce708 fdb066e9"} - }; + 611, "3e9ad646 8bbbad2a c3c2cdc2 92e018ba 5fd70b96 0cf16797 77fce708 fdb066e9"}}; test_hash(sha256_test_set); /************************** SHA-384 Unit Tests **************************/ - std::vector sha384_test_set { + std::vector sha384_test_set{ {"abc", "cb00753f45a35e8b b5a03d699ac65007 272c32ab0eded163 1a8b605a43ff5bed " "8086072ba1e7cc23 58baeca134c825a7"}, - {"abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmno" - "pq" - "rlmnopqrsmnopqrstnopqrstu", - "09330c33f71147e8 3d192fc782cd1b47 53111b173b3b05d2 2fa08086e3b0f712 fcc7c71a557e2db9 " - "66c3e9fa91746039"}, + {"abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmno" + "pq" + "rlmnopqrsmnopqrstnopqrstu", + "09330c33f71147e8 3d192fc782cd1b47 53111b173b3b05d2 2fa08086e3b0f712 fcc7c71a557e2db9 " + "66c3e9fa91746039"}, #if ADOBE_TEST_SHA_MILLION_A_STRING - {million_a_k, "9d0e1809716474cb 086e834e310a4a1c ed149e9c00f24852 7972cec5704c2a5b " - "07b8b3dc38ecc4eb ae97ddd87f3d8985"}, + {million_a_k, "9d0e1809716474cb 086e834e310a4a1c ed149e9c00f24852 7972cec5704c2a5b " + "07b8b3dc38ecc4eb ae97ddd87f3d8985"}, #endif - {"\x10", 5, - "8d17be79e32b6718 e07d8a603eb84ba0 478f7fcfd1bb9399 5f7d1149e09143ac " - "1ffcfc56820e469f 3878d957a15a3fe4"}, - {"\x8b\xc5\x00\xc7\x7c\xee\xd9\x87\x9d\xa9\x89\x10\x7c\xe0\xaa\xa0", 123, - "d8c43b38e12e7c42 a7c9b810299fd6a7 70bef30920f17532 a898de62c7a07e42 93449c0b5fa70109 " - "f0783211cfc4bce3"}, - { - "\x68\xf5\x01\x79\x2d\xea\x97\x96\x76\x70\x22\xd9\x3d\xa7\x16\x79\x30\x99\x20\xfa\x10" - "\x12\xae\xa3\x57\xb2\xb1\x33\x1d\x40\xa1\xd0\x3c\x41\xc2\x40\xb3\xc9\xa7\x5b\x48\x92" - "\xf4\xc0\x72\x4b\x68\xc8\x75\x32\x1a\xb8\xcf\xe5\x02\x3b\xd3\x75\xbc\x0f\x94\xbd\x89" - "\xfe\x04\xf2\x97\x10\x5d\x7b\x82\xff\xc0\x02\x1a\xeb\x1c\xcb\x67\x4f\x52\x44\xea\x34" - "\x97\xde\x26\xa4\x19\x1c\x5f\x62\xe5\xe9\xa2\xd8\x08\x2f\x05\x51\xf4\xa5\x30\x68\x26" - "\xe9\x1c\xc0\x06\xce\x1b\xf6\x0f\xf7\x19\xd4\x2f\xa5\x21\xc8\x71\xcd\x23\x94\xd9\x6e" - "\xf4\x46\x8f\x21\x96\x6b\x41\xf2\xba\x80\xc2\x6e\x83\xa9\xe0", - 1123, - "5860e8de91c21578 bb4174d227898a98 e0b45c4c760f0095 49495614daedc077 " - "5d92d11d9f8ce9b0 64eeac8dafc3a297" - } - }; + {"\x10", 5, + "8d17be79e32b6718 e07d8a603eb84ba0 478f7fcfd1bb9399 5f7d1149e09143ac " + "1ffcfc56820e469f 3878d957a15a3fe4"}, + {"\x8b\xc5\x00\xc7\x7c\xee\xd9\x87\x9d\xa9\x89\x10\x7c\xe0\xaa\xa0", 123, + "d8c43b38e12e7c42 a7c9b810299fd6a7 70bef30920f17532 a898de62c7a07e42 93449c0b5fa70109 " + "f0783211cfc4bce3"}, + {"\x68\xf5\x01\x79\x2d\xea\x97\x96\x76\x70\x22\xd9\x3d\xa7\x16\x79\x30\x99\x20\xfa\x10" + "\x12\xae\xa3\x57\xb2\xb1\x33\x1d\x40\xa1\xd0\x3c\x41\xc2\x40\xb3\xc9\xa7\x5b\x48\x92" + "\xf4\xc0\x72\x4b\x68\xc8\x75\x32\x1a\xb8\xcf\xe5\x02\x3b\xd3\x75\xbc\x0f\x94\xbd\x89" + "\xfe\x04\xf2\x97\x10\x5d\x7b\x82\xff\xc0\x02\x1a\xeb\x1c\xcb\x67\x4f\x52\x44\xea\x34" + "\x97\xde\x26\xa4\x19\x1c\x5f\x62\xe5\xe9\xa2\xd8\x08\x2f\x05\x51\xf4\xa5\x30\x68\x26" + "\xe9\x1c\xc0\x06\xce\x1b\xf6\x0f\xf7\x19\xd4\x2f\xa5\x21\xc8\x71\xcd\x23\x94\xd9\x6e" + "\xf4\x46\x8f\x21\x96\x6b\x41\xf2\xba\x80\xc2\x6e\x83\xa9\xe0", + 1123, + "5860e8de91c21578 bb4174d227898a98 e0b45c4c760f0095 49495614daedc077 " + "5d92d11d9f8ce9b0 64eeac8dafc3a297"}}; test_hash(sha384_test_set); @@ -407,8 +397,7 @@ BOOST_AUTO_TEST_CASE(sha) { "\xc9\x04\x3b\x93\x84\xf5\x49\x06\x80", 1123, "32ba76fc30eaa020 8aeb50ffb5af1864 fdbf17902a4dc0a6 82c61fcea6d92b78 " - "3267b21080301837 f59de79c6b337db2 526f8a0a510e5e53 cafed4355fe7c2f1"} - }; + "3267b21080301837 f59de79c6b337db2 526f8a0a510e5e53 cafed4355fe7c2f1"}}; test_hash(sha512_test_set); } diff --git a/test/sha/shavs.cpp b/test/sha/shavs.cpp index f36945fb..ca9f1224 100644 --- a/test/sha/shavs.cpp +++ b/test/sha/shavs.cpp @@ -7,14 +7,12 @@ #include #include -#include #include - #define BOOST_TEST_MAIN // boost -#include +#include // NOLINT(misc-include-cleaner) // asl #include diff --git a/test/stable_partition_selection/main.cpp b/test/stable_partition_selection/main.cpp index 791ae582..50d070f9 100644 --- a/test/stable_partition_selection/main.cpp +++ b/test/stable_partition_selection/main.cpp @@ -5,38 +5,18 @@ */ /**************************************************************************************************/ -#include - -#include #include - #include #include #include #include #include -/**************************************************************************************************/ - -namespace adobe { - -/**************************************************************************************************/ - -template -std::pair -shift_range(ForwardIterator first, ForwardIterator last, ForwardIterator range_first, - ForwardIterator range_last, ForwardIterator p) { - if (within_range(first, range_first, range_last, p)) - return std::pair(range_first, range_last); - else if (!within_range(first, range_last, last, p)) - return shift_range(first, last, p, range_first, range_last); - - return adobe::rotate(range_first, range_last, p); -} - -/**************************************************************************************************/ +#include +#include -} // namespace adobe +#include +#include /**************************************************************************************************/ diff --git a/test/to_string/main.cpp b/test/to_string/main.cpp index 991af733..872ada76 100644 --- a/test/to_string/main.cpp +++ b/test/to_string/main.cpp @@ -7,12 +7,13 @@ /******************************************************************************/ // stdc++ +#include #include #include #include #include #include -#include + #define BOOST_TEST_MAIN @@ -21,13 +22,12 @@ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunneeded-internal-declaration" #endif -#include +#include // NOLINT(misc-include-cleaner) #ifdef __clang__ #pragma clang diagnostic pop #endif // asl -#include #include #include diff --git a/test/virtual_machine/virtual_machine_test.cpp b/test/virtual_machine/virtual_machine_test.cpp index 0c880a4b..6d5ee204 100644 --- a/test/virtual_machine/virtual_machine_test.cpp +++ b/test/virtual_machine/virtual_machine_test.cpp @@ -14,7 +14,7 @@ #include #define BOOST_TEST_MAIN -#include +#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) using namespace std; using namespace adobe; diff --git a/test/xml_parser/main.cpp b/test/xml_parser/main.cpp index 7190b49c..e69190f3 100644 --- a/test/xml_parser/main.cpp +++ b/test/xml_parser/main.cpp @@ -6,8 +6,6 @@ /**************************************************************************************************/ -#include - #include #include diff --git a/test/zuidgen/main.cpp b/test/zuidgen/main.cpp index 84bd520e..2c957922 100644 --- a/test/zuidgen/main.cpp +++ b/test/zuidgen/main.cpp @@ -5,13 +5,16 @@ */ /**************************************************************************************************/ -#include #include + +#include #include +#include #include #include + /**************************************************************************************************/ #if defined(BOOST_MSVC) && defined(BOOST_THREAD_USE_LIB) From 429c5fe69a6d2e86ee1a54d66d1a45bc25c6c551 Mon Sep 17 00:00:00 2001 From: Sean Parent Date: Thu, 23 Jul 2026 15:53:12 -0700 Subject: [PATCH 04/11] Refactor and clean up code across multiple files - Removed unused includes from `forest.hpp`, `future.hpp`, and `iomanip_asl_cel.hpp`. - Simplified copy constructor and assignment operator in `forest_iterator` by using default implementations. - Added missing include for `` in `future.cpp`. - Removed unused function `throw_variable_not_defined` from `virtual_machine.cpp`. - Updated the initialization of `empty_uuid` in `zuid.cpp` for better clarity. - Cleaned up `functional_test.cpp` by removing unnecessary comments and simplifying enum definitions. - Removed unused `print_binary_message` and `validate` functions from `bench.cpp`. - Added a new file `GlobalCompilationDatabase.cpp` to implement global compilation database functionality. --- adobe/algorithm/equal_range.hpp | 4 +- adobe/algorithm/exists.hpp | 4 -- adobe/algorithm/fill.hpp | 4 -- adobe/algorithm/filter.hpp | 7 ++-- adobe/algorithm/find_match.hpp | 1 - adobe/algorithm/sorted.hpp | 28 +++++-------- adobe/forest.hpp | 4 +- adobe/future.hpp | 1 - adobe/iomanip_asl_cel.hpp | 2 - source/future.cpp | 1 + source/virtual_machine.cpp | 5 --- source/zuid.cpp | 2 +- test/functional/functional_test.cpp | 34 +++++++--------- test/sha/bench.cpp | 61 ----------------------------- 14 files changed, 33 insertions(+), 125 deletions(-) diff --git a/adobe/algorithm/equal_range.hpp b/adobe/algorithm/equal_range.hpp index 314c0adf..32302733 100644 --- a/adobe/algorithm/equal_range.hpp +++ b/adobe/algorithm/equal_range.hpp @@ -233,8 +233,8 @@ equal_range(I& r, const T& x) { template // T == result_type(P) inline std::pair::type, - typename boost::range_const_iterator::type> -equal_range(const I& r, const T& x) { + typename boost::range_const_iterator::type> equal_range(const I& r, + const T& x) { return std::equal_range(boost::begin(r), boost::end(r), x); } diff --git a/adobe/algorithm/exists.hpp b/adobe/algorithm/exists.hpp index 2f8e4a74..c2480584 100644 --- a/adobe/algorithm/exists.hpp +++ b/adobe/algorithm/exists.hpp @@ -8,10 +8,6 @@ #ifndef ADOBE_ALGORITHM_EXISTS_HPP #define ADOBE_ALGORITHM_EXISTS_HPP -#include - -#include - /**************************************************************************************************/ namespace adobe { diff --git a/adobe/algorithm/fill.hpp b/adobe/algorithm/fill.hpp index 14c179d4..ce974ac3 100644 --- a/adobe/algorithm/fill.hpp +++ b/adobe/algorithm/fill.hpp @@ -8,13 +8,9 @@ #ifndef ADOBE_ALGORITHM_FILL_HPP #define ADOBE_ALGORITHM_FILL_HPP -#include - #include #include -#include - /**************************************************************************************************/ namespace adobe { diff --git a/adobe/algorithm/filter.hpp b/adobe/algorithm/filter.hpp index e1c4eeda..05c66b5c 100644 --- a/adobe/algorithm/filter.hpp +++ b/adobe/algorithm/filter.hpp @@ -8,12 +8,9 @@ #ifndef ADOBE_ALGORITHM_FILTER_HPP #define ADOBE_ALGORITHM_FILTER_HPP -#include - #include #include -#include #include /**************************************************************************************************/ @@ -25,7 +22,9 @@ namespace adobe { \defgroup filter filter \ingroup mutating_algorithm -Filter is similar to \c std::tranform. The \c op function is passed an instance of an [output_iterator](https://www.boost.org/sgi/stl/output_iterator.html) and can generate more than (or fewer than) a single result. +Filter is similar to \c std::transform. The \c op function is passed an instance of an +[output_iterator](https://www.boost.org/sgi/stl/output_iterator.html) and can generate more than (or +fewer than) a single result. The \c op function is called once for each item in the range [first, last). The \c result parameter is passed into the first call to \c op, the result of \c op is passed to subsequent diff --git a/adobe/algorithm/find_match.hpp b/adobe/algorithm/find_match.hpp index 25d0cfa9..65fae254 100644 --- a/adobe/algorithm/find_match.hpp +++ b/adobe/algorithm/find_match.hpp @@ -13,7 +13,6 @@ #include #include -#include #include /**************************************************************************************************/ diff --git a/adobe/algorithm/sorted.hpp b/adobe/algorithm/sorted.hpp index 4ba9076d..ed3e176e 100644 --- a/adobe/algorithm/sorted.hpp +++ b/adobe/algorithm/sorted.hpp @@ -15,6 +15,8 @@ #include #include +#include + /**************************************************************************************************/ namespace adobe { @@ -34,10 +36,7 @@ template // O models StrictWeakOrdering on value_type(I) inline bool is_sorted(I f, I l, O o) { - return std::adjacent_find( - f, l, - [&o](const auto& first, const auto& next) { - return !std::invoke(o, first, next); - }) == l; + return std::adjacent_find(f, l, [&o](const auto& first, const auto& next) { + return !std::invoke(o, first, next); + }) == l; } /**************************************************************************************************/ @@ -90,16 +87,9 @@ template // P models UnaryFunction(value_type(I)) -> T inline bool is_sorted(I f, I l, C c, P p) { - return std::adjacent_find( - f, l, - [&c, &p](const auto& first, const auto& next) { - return !std::invoke( - c, - std::invoke(p, first), - std::invoke(p, next) - ); - } - ) == l; + return std::adjacent_find(f, l, [&c, &p](const auto& first, const auto& next) { + return !std::invoke(c, std::invoke(p, first), std::invoke(p, next)); + }) == l; } /**************************************************************************************************/ diff --git a/adobe/forest.hpp b/adobe/forest.hpp index d80f3b37..e26b56b4 100644 --- a/adobe/forest.hpp +++ b/adobe/forest.hpp @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -407,7 +406,8 @@ class forest_iterator forest_iterator() : node_m(0), edge_m(forest_leading_edge) {} - forest_iterator(const forest_iterator& x) : node_m(x.node_m), edge_m(x.edge_m) {} + forest_iterator(const forest_iterator& x) = default; + forest_iterator& operator=(const forest_iterator&) = default; std::size_t edge() const { return edge_m; } std::size_t& edge() { return edge_m; } diff --git a/adobe/future.hpp b/adobe/future.hpp index 9caf1e9e..39844596 100644 --- a/adobe/future.hpp +++ b/adobe/future.hpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include diff --git a/adobe/iomanip_asl_cel.hpp b/adobe/iomanip_asl_cel.hpp index a4f74b50..cddf5109 100644 --- a/adobe/iomanip_asl_cel.hpp +++ b/adobe/iomanip_asl_cel.hpp @@ -14,8 +14,6 @@ /**************************************************************************************************/ -#include - #include /**************************************************************************************************/ diff --git a/source/future.cpp b/source/future.cpp index bb34515c..8335dccf 100644 --- a/source/future.cpp +++ b/source/future.cpp @@ -7,6 +7,7 @@ #include +#include #include #include #include diff --git a/source/virtual_machine.cpp b/source/virtual_machine.cpp index 11336415..183773a0 100644 --- a/source/virtual_machine.cpp +++ b/source/virtual_machine.cpp @@ -247,11 +247,6 @@ adobe::any_regular_t scale_function(const adobe::any_regular_t& arg) { adobe::make_string("function \'", function_name.c_str(), "\' not defined.")); } -[[noreturn]] void throw_variable_not_defined(adobe::name_t variable_name) { - throw std::logic_error( - adobe::make_string("variable \'", variable_name.c_str(), "\' not defined.")); -} - /**************************************************************************************************/ #if 0 diff --git a/source/zuid.cpp b/source/zuid.cpp index 2003b61c..062fac84 100644 --- a/source/zuid.cpp +++ b/source/zuid.cpp @@ -113,7 +113,7 @@ void format_uuid(zuid_char_buffer_t& buffer, const adobe::uuid_t& uuid) { /**************************************************************************************************/ const adobe::uuid_t& empty_uuid() { - static adobe::uuid_t uuid_s = {0}; + static adobe::uuid_t uuid_s = {0, 0, 0, {0}}; return uuid_s; } diff --git a/test/functional/functional_test.cpp b/test/functional/functional_test.cpp index 9f6f9594..e7a0f8c1 100644 --- a/test/functional/functional_test.cpp +++ b/test/functional/functional_test.cpp @@ -7,8 +7,6 @@ #include // file be tested included first -#include - #define BOOST_TEST_MAIN // boost @@ -21,16 +19,24 @@ using namespace adobe; namespace { -/// An enumeration of member function qualifiers as bit fields to identify or mask an overload. +/* + REVISIT(sean-parent) : 2026-07-23. enum-ops don't work within a template argument in VC++. To + avoid casting we define the values we need directly within the enum. +*/ + +/// An enumeration of member function qualifiers as bit fields to identify or mask an +/// overload. enum member_function_qualifiers { _none = 0, _const_lvalue = 1 << 0, _lvalue = 1 << 1, _rvalue = 1 << 2, - _all = _const_lvalue | _lvalue | _rvalue + _all = _const_lvalue | _lvalue | _rvalue, + _all_xor_lvalue = _all ^ _lvalue, + _all_xor_const_lvalue = _all ^ _const_lvalue, + _all_xor_rvalue = _all ^ _rvalue }; -auto adobe_enable_bitmask_enum(member_function_qualifiers) -> std::true_type; /// An overload of a binary function that returns a tuple of its arguments and the qualifiers used. /// Only the members specified by the noexcept_qualifier mask are noexcept. @@ -49,11 +55,6 @@ struct test_binary_function { } // namespace -/* - REVISIT(sean-parent) : The static casts are necessary to get this code to compile on VC++14. - It is unclear why the compiler is unable to find the enum operators. -*/ - BOOST_AUTO_TEST_CASE(functional_transpose) { @@ -61,10 +62,8 @@ BOOST_AUTO_TEST_CASE(functional_transpose) { // function. It also tests that the correct overload is selected and that the noexcept // qualifier is correctly propagated. - transpose lvalue{ - test_binary_function(_all ^ _lvalue)>{}}; - const transpose const_lvalue{ - test_binary_function(_all ^ _const_lvalue)>{}}; + transpose lvalue{test_binary_function<_all_xor_lvalue>{}}; + const transpose const_lvalue{test_binary_function<_all_xor_const_lvalue>{}}; transpose lvalue_noexcept{test_binary_function<_lvalue>{}}; const transpose const_lvalue_noexcept{test_binary_function<_const_lvalue>{}}; @@ -80,11 +79,8 @@ BOOST_AUTO_TEST_CASE(functional_transpose) { BOOST_TEST((const_lvalue_noexcept(1, 2) == tuple(2, 1, _const_lvalue))); BOOST_TEST(noexcept(const_lvalue_noexcept(1, 2))); - BOOST_TEST( - (transpose(test_binary_function(_all ^ _rvalue)>{})( - 1, 2) == tuple(2, 1, _rvalue))); - BOOST_TEST(!noexcept(transpose( - test_binary_function(_all ^ _rvalue)>{})(1, 2))); + BOOST_TEST((transpose(test_binary_function<_all_xor_rvalue>{})(1, 2) == tuple(2, 1, _rvalue))); + BOOST_TEST(!noexcept(transpose(test_binary_function<_all_xor_rvalue>{})(1, 2))); BOOST_TEST((transpose(test_binary_function<_rvalue>{})(1, 2) == tuple(2, 1, _rvalue))); BOOST_TEST(noexcept(transpose(test_binary_function<_rvalue>{})(1, 2))); diff --git a/test/sha/bench.cpp b/test/sha/bench.cpp index c84933d1..7b5af6d1 100644 --- a/test/sha/bench.cpp +++ b/test/sha/bench.cpp @@ -74,30 +74,6 @@ std::string digest_binary(const DigestType& digest) { /**************************************************************************************************/ -void print_binary_message(const std::string& str, std::size_t unit_size = 0) { - std::cout << std::hex; - - std::size_t count(0); - - for (std::string::const_iterator first(str.begin()), last(str.end()); first != last; ++first) { - int value(int(*first) & 0xff); - - std::cout.width(2); - std::cout.fill('0'); - - std::cout << value; - - if (++count == unit_size) { - std::cout << ' '; - count = 0; - } - } - - std::cout << std::dec; -} - -/**************************************************************************************************/ - template std::vector bench(const std::vector& corpus, const char* timer_header, Hash hash) { @@ -364,47 +340,11 @@ std::vector commoncrypto_bench_512(const std::vector& /**************************************************************************************************/ -void validate(const std::vector& x, const std::vector& y) { - if (x.size() != y.size()) - throw std::runtime_error("Hash vector size mismatch"); - - for (std::size_t i(0); i < x.size(); ++i) { - if (x[i] == y[i]) - continue; - - std::cout << " x: "; - print_binary_message(x[i]); - std::cout << '\n'; - - std::cout << " y: "; - print_binary_message(y[i]); - std::cout << '\n'; - - throw std::runtime_error("Digest mismatch"); - } -} - -/**************************************************************************************************/ - } // namespace /**************************************************************************************************/ int main() try { -#if 0 - std::vector corpus; - - for (std::size_t i(0); i < 4; ++i) - { - std::size_t sz((i + 1) * 1000000); - - for (char c('a'); c < 'z'; ++c) - corpus.emplace_back(sz, c); - - for (char c('0'); c < '9'; ++c) - corpus.emplace_back(sz, c); - } -#else const std::size_t factor(1000000); std::size_t n1(1); std::size_t n2(1); @@ -422,7 +362,6 @@ int main() try { n1 = n2; n2 = n; } -#endif std::cout << "SHA-1:\n"; std::vector asl_result_1(asl_bench_1(corpus)); From 45d299e72fa33ad5a1c4d3d53fa350bf32644be0 Mon Sep 17 00:00:00 2001 From: Sean Parent Date: Thu, 23 Jul 2026 16:11:21 -0700 Subject: [PATCH 05/11] Remove redundant comments from Boost test includes across multiple test files --- test/algorithm/clamp/clamp_test.cpp | 2 +- test/algorithm/median/median_test.cpp | 2 +- test/algorithm/minmax/minmax_test.cpp | 2 +- test/algorithm/select/select_test.cpp | 2 +- test/any_regular/any_regular_serialization_test.cpp | 2 +- test/any_regular/any_regular_test.cpp | 2 +- test/conversion/conversion_test.cpp | 2 +- test/equal_range/equal_range_test.cpp | 2 +- test/expression_parser/expression_parser_test.cpp | 2 +- test/functional/functional_test.cpp | 2 +- test/lex_stream/lex_stream_test.cpp | 2 +- test/virtual_machine/virtual_machine_test.cpp | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/algorithm/clamp/clamp_test.cpp b/test/algorithm/clamp/clamp_test.cpp index c4b6415c..0e568f99 100644 --- a/test/algorithm/clamp/clamp_test.cpp +++ b/test/algorithm/clamp/clamp_test.cpp @@ -9,7 +9,7 @@ #define BOOST_TEST_MAIN -#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) +#include // NOLINT(misc-include-cleaner) BOOST_AUTO_TEST_CASE(clamp_test) { using adobe::clamp; diff --git a/test/algorithm/median/median_test.cpp b/test/algorithm/median/median_test.cpp index 8ac8eff1..c16b8324 100644 --- a/test/algorithm/median/median_test.cpp +++ b/test/algorithm/median/median_test.cpp @@ -9,7 +9,7 @@ #define BOOST_TEST_MAIN -#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) +#include // NOLINT(misc-include-cleaner) BOOST_AUTO_TEST_CASE(median_test) { using adobe::median; diff --git a/test/algorithm/minmax/minmax_test.cpp b/test/algorithm/minmax/minmax_test.cpp index e670efcc..a36beb5b 100644 --- a/test/algorithm/minmax/minmax_test.cpp +++ b/test/algorithm/minmax/minmax_test.cpp @@ -9,7 +9,7 @@ #define BOOST_TEST_MAIN -#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) +#include // NOLINT(misc-include-cleaner) struct test_t { bool before(const test_t&) const { return false; } diff --git a/test/algorithm/select/select_test.cpp b/test/algorithm/select/select_test.cpp index 2892f2a9..d2b98af6 100644 --- a/test/algorithm/select/select_test.cpp +++ b/test/algorithm/select/select_test.cpp @@ -11,7 +11,7 @@ #define BOOST_TEST_MAIN -#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) +#include // NOLINT(misc-include-cleaner) BOOST_AUTO_TEST_CASE(select_test) { adobe::select_0_2(10, 5, std::less<>()); diff --git a/test/any_regular/any_regular_serialization_test.cpp b/test/any_regular/any_regular_serialization_test.cpp index 39db6c89..115f7933 100644 --- a/test/any_regular/any_regular_serialization_test.cpp +++ b/test/any_regular/any_regular_serialization_test.cpp @@ -6,7 +6,7 @@ /**************************************************************************************************/ #define BOOST_TEST_MAIN -#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) +#include // NOLINT(misc-include-cleaner) #include diff --git a/test/any_regular/any_regular_test.cpp b/test/any_regular/any_regular_test.cpp index 9ce7a0ce..00272ad8 100644 --- a/test/any_regular/any_regular_test.cpp +++ b/test/any_regular/any_regular_test.cpp @@ -6,7 +6,7 @@ /**************************************************************************************************/ #define BOOST_TEST_MAIN -#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) +#include // NOLINT(misc-include-cleaner) #include diff --git a/test/conversion/conversion_test.cpp b/test/conversion/conversion_test.cpp index fffd3354..932e36f9 100644 --- a/test/conversion/conversion_test.cpp +++ b/test/conversion/conversion_test.cpp @@ -6,7 +6,7 @@ /**************************************************************************************************/ #define BOOST_TEST_MAIN -#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) +#include // NOLINT(misc-include-cleaner) #include diff --git a/test/equal_range/equal_range_test.cpp b/test/equal_range/equal_range_test.cpp index a95e5270..4ce74bf3 100644 --- a/test/equal_range/equal_range_test.cpp +++ b/test/equal_range/equal_range_test.cpp @@ -8,7 +8,7 @@ #include #define BOOST_TEST_MAIN -#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) +#include // NOLINT(misc-include-cleaner) #include #include diff --git a/test/expression_parser/expression_parser_test.cpp b/test/expression_parser/expression_parser_test.cpp index e1acb18c..9bc37017 100644 --- a/test/expression_parser/expression_parser_test.cpp +++ b/test/expression_parser/expression_parser_test.cpp @@ -8,7 +8,7 @@ #include #define BOOST_TEST_MAIN -#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) +#include // NOLINT(misc-include-cleaner) #include diff --git a/test/functional/functional_test.cpp b/test/functional/functional_test.cpp index e7a0f8c1..8aa13894 100644 --- a/test/functional/functional_test.cpp +++ b/test/functional/functional_test.cpp @@ -10,7 +10,7 @@ #define BOOST_TEST_MAIN // boost -#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) +#include // NOLINT(misc-include-cleaner) /**************************************************************************************************/ diff --git a/test/lex_stream/lex_stream_test.cpp b/test/lex_stream/lex_stream_test.cpp index 33c62963..7ca99e98 100644 --- a/test/lex_stream/lex_stream_test.cpp +++ b/test/lex_stream/lex_stream_test.cpp @@ -8,7 +8,7 @@ #include #define BOOST_TEST_MAIN -#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) +#include // NOLINT(misc-include-cleaner) #include diff --git a/test/virtual_machine/virtual_machine_test.cpp b/test/virtual_machine/virtual_machine_test.cpp index 6d5ee204..5773d35a 100644 --- a/test/virtual_machine/virtual_machine_test.cpp +++ b/test/virtual_machine/virtual_machine_test.cpp @@ -14,7 +14,7 @@ #include #define BOOST_TEST_MAIN -#include // NOLINT(misc-include-cleaner) // NOLINT(misc-include-cleaner) +#include // NOLINT(misc-include-cleaner) using namespace std; using namespace adobe; From 7e64c4f28943875d2b091516920a18b73fbf431c Mon Sep 17 00:00:00 2001 From: Sean Parent Date: Thu, 23 Jul 2026 16:33:49 -0700 Subject: [PATCH 06/11] Add validation and binary message printing functions for hash comparison --- test/sha/bench.cpp | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/test/sha/bench.cpp b/test/sha/bench.cpp index 7b5af6d1..cc260654 100644 --- a/test/sha/bench.cpp +++ b/test/sha/bench.cpp @@ -7,7 +7,12 @@ /**************************************************************************************************/ // stdc++ +#include +#include +#include #include +#include +#include #ifndef USING_OPENSSL #define USING_OPENSSL 0 @@ -47,6 +52,13 @@ #include #endif + +#if USING_OPENSSL || ADOBE_PLATFORM_MAC || USING_BOOSTCRYPTO +#include +#include +#include +#endif + /**************************************************************************************************/ namespace { @@ -340,6 +352,58 @@ std::vector commoncrypto_bench_512(const std::vector& /**************************************************************************************************/ +#if USING_OPENSSL || ADOBE_PLATFORM_MAC || USING_BOOSTCRYPTO + +/**************************************************************************************************/ + +void print_binary_message(const std::string& str, std::size_t unit_size = 0) { + std::cout << std::hex; + + std::size_t count(0); + + for (std::string::const_iterator first(str.begin()), last(str.end()); first != last; ++first) { + int value(int(*first) & 0xff); + + std::cout.width(2); + std::cout.fill('0'); + + std::cout << value; + + if (++count == unit_size) { + std::cout << ' '; + count = 0; + } + } + + std::cout << std::dec; +} + +void validate(const std::vector& x, const std::vector& y) { + if (x.size() != y.size()) + throw std::runtime_error("Hash vector size mismatch"); + + for (std::size_t i(0); i < x.size(); ++i) { + if (x[i] == y[i]) + continue; + + std::cout << " x: "; + print_binary_message(x[i]); + std::cout << '\n'; + + std::cout << " y: "; + print_binary_message(y[i]); + std::cout << '\n'; + + throw std::runtime_error("Digest mismatch"); + } +} + +/**************************************************************************************************/ + +#endif + +/**************************************************************************************************/ + } // namespace /**************************************************************************************************/ From a5bd1706072cc0bacfad6c8cf7e216a08962bdd6 Mon Sep 17 00:00:00 2001 From: Sean Parent Date: Thu, 23 Jul 2026 16:46:58 -0700 Subject: [PATCH 07/11] Include Windows header conditionally for better platform compatibility --- source/zuid_sys_dep.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/zuid_sys_dep.cpp b/source/zuid_sys_dep.cpp index b4cb6913..65899d8d 100644 --- a/source/zuid_sys_dep.cpp +++ b/source/zuid_sys_dep.cpp @@ -17,6 +17,9 @@ #include #include +#if ADOBE_PLATFORM_WIN +#include // NOLINT(misc-include-cleaner) +#endif #if defined(BOOST_MSVC) #pragma warning(push) From 493a49d90f139db4e162c0f7f8fca0e2e75c6600 Mon Sep 17 00:00:00 2001 From: Sean Parent Date: Thu, 23 Jul 2026 17:00:52 -0700 Subject: [PATCH 08/11] Add missing algorithm and iterator includes in algorithm headers --- adobe/algorithm/fill.hpp | 2 ++ adobe/algorithm/find_match.hpp | 1 + adobe/algorithm/reduce.hpp | 1 + 3 files changed, 4 insertions(+) diff --git a/adobe/algorithm/fill.hpp b/adobe/algorithm/fill.hpp index ce974ac3..b8031828 100644 --- a/adobe/algorithm/fill.hpp +++ b/adobe/algorithm/fill.hpp @@ -11,6 +11,8 @@ #include #include +#include + /**************************************************************************************************/ namespace adobe { diff --git a/adobe/algorithm/find_match.hpp b/adobe/algorithm/find_match.hpp index 65fae254..25d0cfa9 100644 --- a/adobe/algorithm/find_match.hpp +++ b/adobe/algorithm/find_match.hpp @@ -13,6 +13,7 @@ #include #include +#include #include /**************************************************************************************************/ diff --git a/adobe/algorithm/reduce.hpp b/adobe/algorithm/reduce.hpp index f92eb7fe..db83edb2 100644 --- a/adobe/algorithm/reduce.hpp +++ b/adobe/algorithm/reduce.hpp @@ -16,6 +16,7 @@ #include #include +#include #include /**************************************************************************************************/ From 41bd91cb2e3ffacb02999f74695dad1b3b6f4a5c Mon Sep 17 00:00:00 2001 From: Sean Parent Date: Fri, 24 Jul 2026 12:42:29 -0700 Subject: [PATCH 09/11] Remove unused include and clean up commented Boost include in pmeval.cpp --- adobe/implementation/zuid_sys_dep.hpp | 1 - test/property_model_eval/pmeval.cpp | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/adobe/implementation/zuid_sys_dep.hpp b/adobe/implementation/zuid_sys_dep.hpp index 8042fe84..f1cb4b72 100644 --- a/adobe/implementation/zuid_sys_dep.hpp +++ b/adobe/implementation/zuid_sys_dep.hpp @@ -41,7 +41,6 @@ #include #include -#include #include diff --git a/test/property_model_eval/pmeval.cpp b/test/property_model_eval/pmeval.cpp index b9f82cb2..9b18db9e 100644 --- a/test/property_model_eval/pmeval.cpp +++ b/test/property_model_eval/pmeval.cpp @@ -10,8 +10,9 @@ #include #include #include - -// #include +#include +#include +#include #include #include From e135c8fb7027904e832ed1932e69549de4c7ac03 Mon Sep 17 00:00:00 2001 From: Sean Parent Date: Fri, 24 Jul 2026 13:09:24 -0700 Subject: [PATCH 10/11] Remove deprecated find_first_of implementations and update documentation for clarity --- adobe/algorithm/find.hpp | 75 +--------------------------------------- 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/adobe/algorithm/find.hpp b/adobe/algorithm/find.hpp index 8c9b7b67..552db53b 100644 --- a/adobe/algorithm/find.hpp +++ b/adobe/algorithm/find.hpp @@ -32,6 +32,7 @@ namespace adobe { - [STL documentation for find_if](https://www.boost.org/sgi/stl/find_if.html) - [STL documentation for find_end](https://www.boost.org/sgi/stl/find_end.html) - [STL documentation for find_first_of](https://www.boost.org/sgi/stl/find_first_of.html) + - find_first_of is a quadratic algorithm. Use find_if with is_member instead. - [STL documentation for adjacent_find](https://www.boost.org/sgi/stl/adjacent_find.html) */ @@ -276,80 +277,6 @@ find_end(const ForwardRange1& range1, const ForwardRange2& range2, BinaryPredica boost::end(range2), comp); } -#if 0 - -// find_first_of is a bad algorithm. Use find_first_of_set until we provide a better predicate. - -/*! - \ingroup find - - \brief find implementation -*/ -template -inline typename boost::range_iterator::type -find_first_of(InputRange& range1, const ForwardRange& range2) -{ - return std::find_first_of(boost::begin(range1), boost::end(range1), - boost::begin(range2), boost::end(range2)); -} - -/*! - \ingroup find - - \brief find implementation -*/ -template -inline typename boost::range_const_iterator::type -find_first_of(const InputRange& range1, const ForwardRange& range2) -{ - return std::find_first_of(boost::begin(range1), boost::end(range1), - boost::begin(range2), boost::end(range2)); -} - -/*! - \ingroup find - - \brief find implementation -*/ -template -inline InputIterator find_first_of(InputIterator first1, InputIterator last1, - ForwardIterator first2, ForwardIterator last2, - BinaryPredicate comp) - -{ - return std::find_first_of(first1, last1, first2, last2, std::bind(comp, std::placeholders::_1, std::placeholders::_2)); -} - -/*! - \ingroup find - - \brief find implementation -*/ -template -inline typename boost::range_iterator::type -find_first_of(InputRange& range1, const ForwardRange& range2, BinaryPredicate comp) -{ - return adobe::find_first_of(boost::begin(range1), boost::end(range1), - boost::begin(range2), boost::end(range2), - comp); -} - -/*! - \ingroup find - - \brief find implementation -*/ -template -inline typename boost::range_const_iterator::type -find_first_of(const InputRange& range1, const ForwardRange& range2, BinaryPredicate comp) -{ - return adobe::find_first_of(boost::begin(range1), boost::end(range1), - boost::begin(range2), boost::end(range2), - comp); -} - -#endif - /*! \ingroup find From 9d02ad009ad5fcb3dc3db022b1d3520c9913aa30 Mon Sep 17 00:00:00 2001 From: Sean Parent Date: Fri, 24 Jul 2026 13:12:57 -0700 Subject: [PATCH 11/11] Remove commented-out code and clean up include directive in main.cpp --- test/closed_hash/main.cpp | 123 +------------------------------------- 1 file changed, 1 insertion(+), 122 deletions(-) diff --git a/test/closed_hash/main.cpp b/test/closed_hash/main.cpp index 31ced442..ae879836 100644 --- a/test/closed_hash/main.cpp +++ b/test/closed_hash/main.cpp @@ -13,7 +13,7 @@ #include #include -#include // NOLINT(misc-include-cleaner) // NOLINT(misc-inlucde-cleaner) +#include // NOLINT(misc-include-cleaner) #include @@ -164,125 +164,4 @@ BOOST_AUTO_TEST_CASE(closed_hash) { BOOST_CHECK(x.size() == 3); // BOOST_CHECK(addr == remote_address(x.find(2)->second)); } - -#if 0 - { // push_back - vector_t x(3, 7); - const void* addr = remote_address(x); - vector_vector_t y; - y.push_back(x); - BOOST_CHECK(y.front() == x); - y.push_back(std::move(x)); - BOOST_CHECK(y.front() == y.back()); - BOOST_CHECK(y.size() == 2); - BOOST_CHECK(addr == remote_address(y.back())); - BOOST_CHECK(x.empty()); - y.pop_back(); - y.pop_back(); - BOOST_CHECK(y.size() == 0); - } - { // swap - vector_t x(3, 7); - vector_t y(4, 5); - const void* addr_x = remote_address(x); - const void* addr_y = remote_address(y); - swap(x, y); - BOOST_CHECK(addr_x = remote_address(y)); - BOOST_CHECK(addr_y = remote_address(x)); - } - { // insert - int a[] = { 0, 1, 2, 3, 4, 5 }; - vector_t x(std::begin(a), std::end(a)); - int b[] = { 0, 1, 7, 2, 3, 4, 5 }; - vector_t y(std::begin(b), std::end(b)); - x.insert(x.begin() + 2, 7); - BOOST_CHECK(x == y); - } - { // insert (move case) - vector_t a[] = { vector_t(1, 1), vector_t(2, 2), vector_t(3, 3) }; - vector_vector_t x(std::begin(a), std::end(a)); - vector_t b[] = { vector_t(1, 1), vector_t(2, 2), vector_t(7, 7), vector_t(3, 3) }; - vector_vector_t y(std::begin(b), std::end(b)); - vector_t z(7, 7); - const void* addr = remote_address(z); - x.insert(x.begin() + 2, std::move(z)); - BOOST_CHECK(x == y); - BOOST_CHECK(z.empty() && addr == remote_address(x[2])); - } - { // insert range - int a[] = { 0, 1, 2, 3, 4, 5 }; - vector_t x(std::begin(a), std::end(a)); - int b[] = { 7, 8, 9 }; - int c[] = { 0, 1, 7, 8, 9, 2, 3, 4, 5 }; - vector_t y(std::begin(c), std::end(c)); - - x.insert(x.begin() + 2, std::begin(b), std::end(b)); - BOOST_CHECK(x == y); - } - { // insert fill - int a[] = { 0, 1, 2, 3, 4, 5 }; - vector_t x(std::begin(a), std::end(a)); - int b[] = { 0, 1, 7, 7, 7, 2, 3, 4, 5 }; - vector_t y(std::begin(b), std::end(b)); - x.insert(x.begin() + 2, 3, 7); - BOOST_CHECK(x == y); - } - { // erase - int a[] = { 0, 1, 2, 3, 4, 5 }; - vector_t x(std::begin(a), std::end(a)); - int b[] = { 0, 1, 3, 4, 5 }; - vector_t y(std::begin(b), std::end(b)); - x.erase(x.begin() + 2); - BOOST_CHECK(x == y); - } - { // erase range - int a[] = { 0, 1, 2, 3, 4, 5 }; - vector_t x(std::begin(a), std::end(a)); - int b[] = { 0, 1, 5 }; - vector_t y(std::begin(b), std::end(b)); - x.erase(x.begin() + 2, x.begin() + 5); - BOOST_CHECK(x == y); - } - { // clear - int a[] = { 0, 1, 2, 3, 4, 5 }; - vector_t x(std::begin(a), std::end(a)); - x.clear(); - BOOST_CHECK(x.size() == 0); - } - { // resize smaller - int a[] = { 0, 1, 2, 3, 4, 5 }; - vector_t x(std::begin(a), std::end(a)); - int b[] = { 0, 1, 2 }; - vector_t y(std::begin(b), std::end(b)); - x.resize(3); - BOOST_CHECK(x == y); - } - { // resize larger - int a[] = { 0, 1, 2, 3, 4, 5 }; - vector_t x(std::begin(a), std::end(a)); - int b[] = { 0, 1, 2, 3, 4, 5, 0, 0, 0 }; - vector_t y(std::begin(b), std::end(b)); - x.resize(x.size() + 3); - BOOST_CHECK(x == y); - } - { // resize fill - int a[] = { 0, 1, 2, 3, 4, 5 }; - vector_t x(std::begin(a), std::end(a)); - int b[] = { 0, 1, 2, 3, 4, 5, 7, 7, 7 }; - vector_t y(std::begin(b), std::end(b)); - x.resize(x.size() + 3, 7); - BOOST_CHECK(x == y); - } - { // comparison operators - int a[] = { 0, 1, 2, 3, 4, 5 }; - vector_t x(std::begin(a), std::end(a)); - int b[] = { 0, 1, 2, 5, 6 }; - vector_t y(std::begin(b), std::end(b)); - BOOST_CHECK(x != y); - BOOST_CHECK(x < y); - BOOST_CHECK(y > x); - BOOST_CHECK(x <= y); - BOOST_CHECK(y >= x); - } -#endif }