KaMPIng 0.1.0
(Near) zero-overhead C++ MPI bindings.
Loading...
Searching...
No Matches
kamping::internal::is_specialization< Template< Args... >, Template > Struct Template Reference

Type trait to check if a type is an instance of a templated type. More...

#include <data_buffer.hpp>

Inheritance diagram for kamping::internal::is_specialization< Template< Args... >, Template >:

Detailed Description

template<template< class... > class Template, class... Args>
struct kamping::internal::is_specialization< Template< Args... >, Template >

Type trait to check if a type is an instance of a templated type.

based on https://stackoverflow.com/a/31763111

A little note on how this works:

  • consider is_specialization<std::vector<bool, my_alloc>, std::vector>
  • this gets template matched with the following specialization such that
    • Template = template<T...> std::vector<T...>
    • Args... = bool, my_alloc
  • but this may only be matched in the case that Template<Args...> = std::vector<bool, my_alloc>
    Template Parameters
    TThe concrete type.
    Templatethe type template
    Returns
    true if the type is an instance and false otherwise.

The documentation for this struct was generated from the following file: