diff options
author | johannst <johannst@users.noreply.github.com> | 2022-08-24 16:10:10 +0000 |
---|---|---|
committer | johannst <johannst@users.noreply.github.com> | 2022-08-24 16:10:10 +0000 |
commit | 865999619eb8e79a3e36ac17f782c7c302ca923e (patch) | |
tree | 797a40e2ebd99febb6369d4f235ffa16041a6a2c /development/c++/meta.cc | |
parent | 25b609d0c70d49dd62479ce03578704e62712bd8 (diff) | |
download | notes-865999619eb8e79a3e36ac17f782c7c302ca923e.tar.gz notes-865999619eb8e79a3e36ac17f782c7c302ca923e.zip |
deploy: e6f439cb43ee51b13ed4d29ec84ac5450556b163
Diffstat (limited to 'development/c++/meta.cc')
-rw-r--r-- | development/c++/meta.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/development/c++/meta.cc b/development/c++/meta.cc index e674cfd..efb3b22 100644 --- a/development/c++/meta.cc +++ b/development/c++/meta.cc @@ -2,6 +2,8 @@ #include <iostream> +// -- Example 1 - print template value arguments. + // Base case with one parameter. template<int P> void show_int() { @@ -15,6 +17,8 @@ void show_int() { show_int<P1, Params...>(); } +// -- Example 2 - print values of different types. + // Base case with one parameter. template<typename T> void show(const T& t) { |