From 9eec329ebdf4cf079619edb58dbcd78ce42b8626 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 18 Nov 2025 07:44:48 +0100 Subject: feat: lib: error_handler improvements, new method. FIX module improvements. Signed-off-by: Amlal El Mahrouss --- dev/examples/fix/CMakeLists.txt | 3 +++ dev/examples/fix/fix.cc | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'dev/examples/fix') diff --git a/dev/examples/fix/CMakeLists.txt b/dev/examples/fix/CMakeLists.txt index db8921b..5ed31e7 100644 --- a/dev/examples/fix/CMakeLists.txt +++ b/dev/examples/fix/CMakeLists.txt @@ -6,7 +6,10 @@ project( VERSION 1.0 LANGUAGES CXX) +find_package(Boost REQUIRED COMPONENTS container) + add_executable(Fix fix.cc) +target_link_libraries(Fix PRIVATE Boost::container) set_property(TARGET Fix PROPERTY CXX_STANDARD 20) target_include_directories(Fix PUBLIC ../../) diff --git a/dev/examples/fix/fix.cc b/dev/examples/fix/fix.cc index ec6668a..4015a67 100644 --- a/dev/examples/fix/fix.cc +++ b/dev/examples/fix/fix.cc @@ -4,10 +4,12 @@ licensed under the MIT license */ +#include #include #include #include #include +#include #include /* finally test it */ @@ -22,12 +24,13 @@ int main(int argc, char** argv) std::cout << "magic_len=" << fix.magic_len_ << std::endl; std::cout << "is_valid=" << std::boolalpha << fix.is_valid() << std::endl; - ocl::fix::must_pass(fix); + ocl::basic_error_handler handler; + ocl::fix::must_pass(fix, handler); for (auto fields : fix.body_) { - std::cout << "key=" << fields.first; - std::cout << ":value=" << fields.second << std::endl; + ocl::io::print("key=", fields.first); + ocl::io::print(", value=", fields.second); } return 0; -- cgit v1.2.3