From: Luca Heltai Date: Tue, 18 Jul 2017 20:22:52 +0000 (+0200) Subject: Made all stl containers and map available. X-Git-Tag: v9.0.0-rc1~1391^2~16 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7987997df37b4e3ef6e13cb13253a14637e9b6c8;p=dealii.git Made all stl containers and map available. --- diff --git a/include/deal.II/base/patterns_tools.h b/include/deal.II/base/patterns_tools.h index 631de078ef..584a18ca7e 100644 --- a/include/deal.II/base/patterns_tools.h +++ b/include/deal.II/base/patterns_tools.h @@ -31,8 +31,22 @@ #include #include #include -#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + DEAL_II_NAMESPACE_OPEN @@ -72,7 +86,7 @@ namespace PatternsTools * compatible with the List type. Adding more compatible types is a matter * of adding a specialization of this struct for the given type. */ - template + template struct RankInfo { typedef std::integral_constant::type vector_rank_type; @@ -192,41 +206,76 @@ namespace PatternsTools } }; + //specialize a type for all of the STL containers and maps + namespace internal + { + template struct is_stl_container:std::false_type {}; + template struct is_stl_container> :std::true_type {}; + template struct is_stl_container>:std::true_type {}; + template struct is_stl_container>:std::true_type {}; + template struct is_stl_container>:std::true_type {}; + template struct is_stl_container>:std::true_type {}; + template struct is_stl_container>:std::true_type {}; + template struct is_stl_container>:std::true_type {}; + template struct is_stl_container>:std::true_type {}; + template struct is_stl_container>:std::true_type {}; + template struct is_stl_container>:std::true_type {}; + template struct is_stl_container>:std::true_type {}; + template struct is_stl_container>:std::true_type {}; + + template struct is_stl_map:std::false_type {}; + template struct is_stl_map>:std::true_type {}; + template struct is_stl_map>:std::true_type {}; + template struct is_stl_map>:std::true_type {}; + template struct is_stl_map>:std::true_type {}; + } + + //type trait to use the implementation type traits as well as decay the type + template struct is_stl_container + { + static constexpr bool const value = internal::is_stl_container>::value; + }; + + + template struct is_stl_map + { + static constexpr bool const value = internal::is_stl_map>::value; + }; + + // Rank of vector types - template