Commit efe41a97 authored by Michael Tesch's avatar Michael Tesch
Browse files

Merge branch 'patch-2' into 'master'

Made explicit cast to arithmetic type const

See merge request tesch1/cppduals!21
parents dee3caea c39b95ea
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -506,7 +506,7 @@ public:
  /// Explicit cast to an arithmetic type retains the rpart()
  template <class X,
            CPPDUALS_ENABLE_IF(std::is_arithmetic<X>::value && !is_dual<X>::value)>
  explicit operator X () { return X(_real); }
  explicit operator X() const { return X(_real); }

  /// Get the real part.
  T rpart() const { return _real; }