]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Restrict operator<< for SymEngine auxiliary classes.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 15 May 2024 19:31:12 +0000 (13:31 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 16 May 2024 01:42:21 +0000 (19:42 -0600)
include/deal.II/differentiation/sd/symengine_optimizer.h

index 74a088c0fac6f6c05ecce50ffa6d25a16b14c02c..9da2b5543720863dbd9933846d621a22a696abdd 100644 (file)
@@ -45,6 +45,7 @@
 #  include <boost/type_traits.hpp>
 
 #  include <algorithm>
+#  include <iosfwd>
 #  include <map>
 #  include <memory>
 #  include <type_traits>
@@ -114,9 +115,8 @@ namespace Differentiation
     /**
      * Output operator that outputs the selected optimizer type.
      */
-    template <typename StreamType>
-    inline StreamType &
-    operator<<(StreamType &s, OptimizerType o)
+    inline std::ostream &
+    operator<<(std::ostream &s, OptimizerType o)
     {
       if (o == OptimizerType::dictionary)
         s << "dictionary";
@@ -266,9 +266,8 @@ namespace Differentiation
      * Output operator that outputs optimization flags as a set of or'd
      * text values.
      */
-    template <typename StreamType>
-    inline StreamType &
-    operator<<(StreamType &s, OptimizationFlags o)
+    inline std::ostream &
+    operator<<(std::ostream &s, OptimizationFlags o)
     {
       s << " OptimizationFlags|";
       if (static_cast<unsigned int>(o & OptimizationFlags::optimize_cse))

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.