* Reference-counted pointer template. */
/*
- * GiNaC Copyright (C) 1999-2016 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
// 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); }
/** 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);