From: Luca Heltai Date: Thu, 26 Oct 2017 21:56:39 +0000 (+0200) Subject: Added another constructor type. X-Git-Tag: v9.0.0-rc1~864^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5331%2Fhead;p=dealii.git Added another constructor type. --- 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)