From 4a5a35e2f96acae54d716850f4fa4f88e61f9a8e Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Thu, 26 Oct 2017 23:56:39 +0200 Subject: [PATCH] Added another constructor type. --- include/deal.II/base/patterns.h | 11 ++++++++++- source/base/patterns.cc | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/deal.II/base/patterns.h b/include/deal.II/base/patterns.h index 14470889b7..7f143c4303 100644 --- a/include/deal.II/base/patterns.h +++ b/include/deal.II/base/patterns.h @@ -700,6 +700,15 @@ namespace Patterns Tuple (const std::vector > &patterns, const std::string &separator = ","); + /** + * Constructor. Same as above, specialized for const char *. This is + * necessary to avoid compilers errors due to the variadic constructors + * provided below. + */ + Tuple (const std::vector > &patterns, + const char *separator); + + /** * Constructor. Creates a Tuple from more than one class derived from * PatternBase. @@ -716,7 +725,7 @@ namespace Patterns * directly the separator without using std::string(";"). * * Since we support a pure variadic templates version, without this - * specialization, the compiler will fail with criptyc errors. + * specialization, the compiler will fail with cryptic errors. */ template Tuple (const char *separator, diff --git a/source/base/patterns.cc b/source/base/patterns.cc index 4d56e88b62..7c529584cc 100644 --- a/source/base/patterns.cc +++ b/source/base/patterns.cc @@ -966,6 +966,13 @@ namespace Patterns + Tuple::Tuple (const std::vector > &ps, + const char *separator) : + Tuple(ps, std::string(separator)) + {} + + + Tuple::Tuple (const Tuple &other) : separator (other.separator) -- 2.39.5