]> www.ginac.de Git - ginac.git/blobdiff - ginac/print.h
Remove dependence on depreacted std::auto_ptr<T>.
[ginac.git] / ginac / print.h
index 4a56da894780f0bfd27852d6d02e2530c9fbde7e..47050dde90a75ddb4a687c552eb4bbf7ff0d67eb 100644 (file)
@@ -238,9 +238,9 @@ private:
  *  implements the actual function call. */
 class print_functor {
 public:
  *  implements the actual function call. */
 class print_functor {
 public:
-       print_functor() : impl(0) {}
+       print_functor() : impl(nullptr) {}
        print_functor(const print_functor & other) : impl(other.impl.get() ? other.impl->duplicate() : 0) {}
        print_functor(const print_functor & other) : impl(other.impl.get() ? other.impl->duplicate() : 0) {}
-       print_functor(std::auto_ptr<print_functor_impl> impl_) : impl(impl_) {}
+       print_functor(std::unique_ptr<print_functor_impl> impl_) : impl(std::move(impl_)) {}
 
        template <class T, class C>
        print_functor(void f(const T &, const C &, unsigned)) : impl(new print_ptrfun_handler<T, C>(f)) {}
 
        template <class T, class C>
        print_functor(void f(const T &, const C &, unsigned)) : impl(new print_ptrfun_handler<T, C>(f)) {}
@@ -265,7 +265,7 @@ public:
        bool is_valid() const { return impl.get(); }
 
 private:
        bool is_valid() const { return impl.get(); }
 
 private:
-       std::auto_ptr<print_functor_impl> impl;
+       std::unique_ptr<print_functor_impl> impl;
 };
 
 
 };