From 2448ac2ef13d96e4ef3b7a9a15ef1cfdc2195831 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 14 Dec 2025 02:18:46 +0100 Subject: chore: `option.hpp` improvements, new examples in `examples`. Signed-off-by: Amlal El Mahrouss --- examples/option_example/CMakeLists.txt | 15 +++++++++++++++ examples/option_example/example.cc | 11 +++++++++++ 2 files changed, 26 insertions(+) create mode 100644 examples/option_example/CMakeLists.txt create mode 100644 examples/option_example/example.cc (limited to 'examples/option_example') diff --git a/examples/option_example/CMakeLists.txt b/examples/option_example/CMakeLists.txt new file mode 100644 index 0000000..a77d4c5 --- /dev/null +++ b/examples/option_example/CMakeLists.txt @@ -0,0 +1,15 @@ + +cmake_minimum_required(VERSION 3.15...3.31) + +project( + OptionExample + VERSION 1.0 + LANGUAGES CXX) + +find_package(Boost REQUIRED COMPONENTS container) + +add_executable(OptionExample example.cc) + +set_property(TARGET OptionExample PROPERTY CXX_STANDARD 20) +target_include_directories(OptionExample PUBLIC ../../include/) +target_link_libraries(OptionExample PRIVATE Boost::container) diff --git a/examples/option_example/example.cc b/examples/option_example/example.cc new file mode 100644 index 0000000..7649438 --- /dev/null +++ b/examples/option_example/example.cc @@ -0,0 +1,11 @@ +#include +#include +#include + +int main(int argc, char** argv) +{ + ocl::option opt{ocl::eval_eq(nullptr, nullptr)}; + opt.expect("is incorrect"); + + return 0; +} -- cgit v1.2.3