X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fptr.h;h=a2e9d8fe61b70a629391e085e5d3eaf8cb34c17b;hb=761d1597532504762c1f9b438c7727c4f74d7da3;hp=29db23501ead133f09d92fcd47c432bcbe7423d8;hpb=47ecb72dce5ea9c917d1e1e77863c45a8b2b1bba;p=ginac.git diff --git a/ginac/ptr.h b/ginac/ptr.h index 29db2350..a2e9d8fe 100644 --- a/ginac/ptr.h +++ b/ginac/ptr.h @@ -3,7 +3,7 @@ * Reference-counted pointer template. */ /* - * GiNaC Copyright (C) 1999-2016 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2017 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);