]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Added another constructor type. 5331/head
authorLuca Heltai <luca.heltai@sissa.it>
Thu, 26 Oct 2017 21:56:39 +0000 (23:56 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Thu, 26 Oct 2017 21:59:54 +0000 (23:59 +0200)
include/deal.II/base/patterns.h
source/base/patterns.cc

index 14470889b7232670f3483fdb09e00b3e176f871a..7f143c43036515e71dd45988018a12491457b260 100644 (file)
@@ -700,6 +700,15 @@ namespace Patterns
     Tuple (const std::vector<std::unique_ptr<PatternBase> > &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<std::unique_ptr<PatternBase> > &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<class... PatternTypes>
     Tuple (const char *separator,
index 4d56e88b62eff19c04d8cb319e35a811aea17bbe..7c529584cc2685004e5a2f255b3c621c475d994c 100644 (file)
@@ -966,6 +966,13 @@ namespace Patterns
 
 
 
+  Tuple::Tuple (const std::vector<std::unique_ptr<PatternBase> >  &ps,
+                const char *separator) :
+    Tuple(ps, std::string(separator))
+  {}
+
+
+
   Tuple::Tuple (const Tuple &other)
     :
     separator (other.separator)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.