diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-04-12 22:41:33 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-04-12 22:41:33 +0200 |
commit | a6d3ae16736d7746ad6827f10c299ad84aa78a5b (patch) | |
tree | ed71c7fb6b2d4cc82c78fd7ec1ffeadadf31c681 /src/development/c++.md | |
parent | 724d077860e103631605f09a7de35e3ad8796f56 (diff) | |
download | notes-a6d3ae16736d7746ad6827f10c299ad84aa78a5b.tar.gz notes-a6d3ae16736d7746ad6827f10c299ad84aa78a5b.zip |
c++: add example for picking template with partial specialzations
Diffstat (limited to 'src/development/c++.md')
-rw-r--r-- | src/development/c++.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/development/c++.md b/src/development/c++.md index e6fcfef..9dc8fb0 100644 --- a/src/development/c++.md +++ b/src/development/c++.md @@ -69,6 +69,10 @@ struct is_valid<T, std::void_t< ``` > `std::declval<T>()` creates an instance of type T in an unevaluated context. +## Template selection with partially / fully specializations. +```cpp +{{#include c++/tmpl-pair.cc:3:}} +``` [gist-strict-asliasing]: https://gist.github.com/shafik/848ae25ee209f698763cffee272a58f8 [parameter-pack]: https://en.cppreference.com/w/cpp/language/parameter_pack |