X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;ds=sidebyside;f=ginac%2Fptr.h;h=9d76bfeed3ee4ce79317c39a2783467a210d78f5;hb=4be8b22ca5bfa6878bd746383c7e347e5687293b;hp=0f5dae37e752f172ec98759c443dffe3c2db5dfb;hpb=852fb174c43b49a3ce1b568f959d23e8a1959ee1;p=ginac.git diff --git a/ginac/ptr.h b/ginac/ptr.h index 0f5dae37..9d76bfee 100644 --- a/ginac/ptr.h +++ b/ginac/ptr.h @@ -3,7 +3,7 @@ * Reference-counted pointer template. */ /* - * GiNaC Copyright (C) 1999-2015 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2016 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 @@ -61,7 +61,7 @@ template class ptr { // 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 to enable ordering of ptr * objects (e.g. for the use as std::map keys). */ -template struct less> - : public binary_function, GiNaC::ptr, bool> { +template struct less> { bool operator()(const GiNaC::ptr &lhs, const GiNaC::ptr &rhs) const { return less()(lhs.p, rhs.p);