]> www.ginac.de Git - ginac.git/blobdiff - ginac/ptr.h
Finalize 1.7.6 release.
[ginac.git] / ginac / ptr.h
index 5911dd675cb4efd07c1252380b00b078e00c2a7d..baf0f991c15271c25a0d1a4ad5c7d4d5b40d8e6c 100644 (file)
@@ -3,7 +3,7 @@
  *  Reference-counted pointer template. */
 
 /*
- *  GiNaC Copyright (C) 1999-2015 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2019 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -54,14 +54,14 @@ private:
  *      from refcounted)
  *    T* T::duplicate() member function (only if makewriteable() is used) */
 template <class T> class ptr {
-       friend class std::less< ptr<T> >;
+       friend struct std::less<ptr<T>>;
 
        // NB: This implementation of reference counting is not thread-safe.
        // The reference counter needs to be incremented/decremented atomically,
        // and makewritable() requires locking.
 
 public:
-    // no default ctor: a ptr is never unbound
+       // no default ctor: a ptr is never unbound
 
        /** Bind ptr to newly created object, start reference counting. */
        ptr(T *t) noexcept : p(t) { GINAC_ASSERT(p); p->set_refcount(1); }
@@ -155,8 +155,7 @@ namespace std {
 
 /** Specialization of std::less for ptr<T> to enable ordering of ptr<T>
  *  objects (e.g. for the use as std::map keys). */
-template <class T> struct less< GiNaC::ptr<T> >
- : public binary_function<GiNaC::ptr<T>, GiNaC::ptr<T>, bool> {
+template <class T> struct less<GiNaC::ptr<T>> {
        bool operator()(const GiNaC::ptr<T> &lhs, const GiNaC::ptr<T> &rhs) const
        {
                return less<T*>()(lhs.p, rhs.p);