From 0c4bf7dcce78638465ee1a1c7e5c5ffb2775a800 Mon Sep 17 00:00:00 2001 From: Kris Jusiak Date: Wed, 16 Apr 2025 12:28:51 +0100 Subject: [PATCH 1/3] :books: [README] --- mp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mp b/mp index fda2635..d32f3da 100644 --- a/mp +++ b/mp @@ -23,7 +23,7 @@ // #if 0 // --> -[Overview](#Overview) / [Examples](#Examples) / [API](#API) / [FAQ](#FAQ) / Resources(#Resources) +[Overview](#Overview) / [Examples](#Examples) / [API](#API) / [FAQ](#FAQ) / [Resources](#Resources) ## MP: ~~Template~~ Meta-Programming library From 94cb1b267cd5c78785b037faadba5707dd38af71 Mon Sep 17 00:00:00 2001 From: Kris Jusiak Date: Wed, 16 Apr 2025 13:34:50 +0100 Subject: [PATCH 2/3] :books: [README] API --- mp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mp b/mp index d32f3da..38cb495 100644 --- a/mp +++ b/mp @@ -244,8 +244,8 @@ namespace mp::inline v2_0_11 { /** * unrolls fn N times # optionally passes index I to fn * @code - * mp::unroll<3>([]{ std::print("mp"); }); - * mp::unroll<3>([]{ std::print("{}", I); }); + * mp::unroll<3>([]{ std::print("mp"); }); // prints 'mpmpmp' + * mp::unroll<3>([]{ std::print("{}", I); }); // prints '012' * @endcode */ template @@ -553,8 +553,8 @@ template class T, class... Ts, auto = []{}> /** * unrolls fn N times # optionally passes index I to fn * @code - * mp::unroll<3>([]{ std::print("mp"); }); - * mp::unroll<3>([]{ std::print("{}", I); }); + * mp::unroll<3>([]{ std::print("mp"); }); // prints 'mpmpmp' + * mp::unroll<3>([]{ std::print("{}", I); }); // prints '012' * @endcode */ template From 75968e01b5ce07439430cbbbe6006c56ce651cab Mon Sep 17 00:00:00 2001 From: Kris Jusiak Date: Sat, 19 Apr 2025 07:59:41 +0100 Subject: [PATCH 3/3] :new: [module] mp.cppm --- mp | 2 +- mp.cppm | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 mp.cppm diff --git a/mp b/mp index 38cb495..63334ed 100644 --- a/mp +++ b/mp @@ -36,7 +36,7 @@ ### Features -- Single header (https://raw.githubusercontent.com/qlibs/mp/main/mp) +- Single header (https://raw.githubusercontent.com/qlibs/mp/main/mp) / C++20 module (https://raw.githubusercontent.com/qlibs/mp/main/mp.cppm) - Minimal [API](#api) and learning curve (supports STL, ranges, ...) - Supports debugging (meta-functions can be executed and debugged at run-time - see [examples](#examples)) - Supports reflection (requires https://github.com/qlibs/reflect - see [examples](#examples)) diff --git a/mp.cppm b/mp.cppm new file mode 100644 index 0000000..9545da8 --- /dev/null +++ b/mp.cppm @@ -0,0 +1,42 @@ +//