From e6f439cb43ee51b13ed4d29ec84ac5450556b163 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Wed, 24 Aug 2022 18:09:52 +0200 Subject: c++: add any_of meta fn example --- src/development/c++/meta.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/development/c++/meta.cc') diff --git a/src/development/c++/meta.cc b/src/development/c++/meta.cc index e674cfd..efb3b22 100644 --- a/src/development/c++/meta.cc +++ b/src/development/c++/meta.cc @@ -2,6 +2,8 @@ #include +// -- Example 1 - print template value arguments. + // Base case with one parameter. template void show_int() { @@ -15,6 +17,8 @@ void show_int() { show_int(); } +// -- Example 2 - print values of different types. + // Base case with one parameter. template void show(const T& t) { -- cgit v1.2.3