|
7 | 7 |
|
8 | 8 | /*!\file |
9 | 9 | * \author Hannes Hauswedell <hannes.hauswedell AT fu-berlin.de> |
| 10 | + * \author Lydia Buntrock <lydia.buntrock AT fu-berlin.de> |
10 | 11 | * \brief Provides type traits for working with templates. |
11 | 12 | */ |
12 | 13 |
|
@@ -235,6 +236,36 @@ struct valid_template_spec_or<fallback_t, templ_t, spec_t...> |
235 | 236 | template <typename fallback_t, template <typename ...> typename templ_t, typename ...spec_t> |
236 | 237 | using valid_template_spec_or_t = typename valid_template_spec_or<fallback_t, templ_t, spec_t...>::type; |
237 | 238 |
|
| 239 | +// ---------------------------------------------------------------------------- |
| 240 | +// template_specialisation_of |
| 241 | +// ---------------------------------------------------------------------------- |
| 242 | + |
| 243 | +/*!\addtogroup concept |
| 244 | + * \{ |
| 245 | + */ |
| 246 | + |
| 247 | +/*!\interface seqan3::template_specialisation_of <> |
| 248 | + * \brief Provides concept `seqan3::template_specialisation_of<mytype, [...]>` for checking the type specialisation of |
| 249 | + * some type with a given template, for example a specialized `type_list<float>` with the `type_list` template. |
| 250 | + * |
| 251 | + * \ingroup type_traits |
| 252 | + * |
| 253 | + * \tparam mytype The query type. |
| 254 | + * \tparam type_template The type template you wish to compare against mytype. |
| 255 | + * |
| 256 | + * \see seqan3::detail::is_type_specialisation_of_v |
| 257 | + * |
| 258 | + * ### Example |
| 259 | + * |
| 260 | + * \include test/snippet/core/detail/template_inspection_usage_3.cpp |
| 261 | + */ |
| 262 | +//!\cond |
| 263 | +template <typename mytype, template <typename ...> typename type_template> |
| 264 | +SEQAN3_CONCEPT template_specialisation_of = is_type_specialisation_of_v<mytype, type_template>; |
| 265 | + |
| 266 | +//!\endcond |
| 267 | +//!\} |
| 268 | + |
238 | 269 | // ---------------------------------------------------------------------------- |
239 | 270 | // strip_type_identity |
240 | 271 | // ---------------------------------------------------------------------------- |
|
0 commit comments