* GiNaC's class registrar (for class basic and all classes derived from it). */
/*
- * 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
* registry (mainly needed for archiving). */
#define GINAC_DECLARE_REGISTERED_CLASS(classname, supername) \
GINAC_DECLARE_REGISTERED_CLASS_NO_CTORS(classname, supername) \
+ template<class B, typename... Args> friend B & dynallocate(Args &&... args); \
public: \
classname(); \
- classname * duplicate() const override { return new classname(*this); } \
+ classname * duplicate() const override { \
+ classname * bp = new classname(*this); \
+ bp->setflag(status_flags::dynallocated); \
+ return bp; \
+ } \
\
void accept(GiNaC::visitor & v) const override \
{ \