From: Richard Kreckel Date: Sat, 10 Oct 2020 18:20:59 +0000 (+0200) Subject: Remove deprecated initialization via overloaded comma operator. X-Git-Tag: release_1-8-0~12 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=e62c12d0c93db3a1da2bc25532ffbf23e41c6292;ds=sidebyside Remove deprecated initialization via overloaded comma operator. This feature has been marked as deprecated since 1.7.0. There's been more than four years to switch to initializer lists. Let's hope people have modified their code since. --- diff --git a/ginac/container.h b/ginac/container.h index 6909b743..6c312e74 100644 --- a/ginac/container.h +++ b/ginac/container.h @@ -68,63 +68,6 @@ template <> inline void container_storage::reserve(std::vector & v, size_t n) { v.reserve(n); } -/** Helper template to allow initialization of containers via an overloaded - * comma operator (idea stolen from Blitz++). */ -template -class container_init { -public: - container_init(STLT & s) : stlt(s) {} - - container_init operator,(const T & x) - { - stlt.push_back(x); - return container_init(stlt); - } - - // The following specializations produce much tighter code than the - // general case above - - container_init operator,(int x) - { - stlt.push_back(x); - return container_init(stlt); - } - - container_init operator,(unsigned int x) - { - stlt.push_back(x); - return container_init(stlt); - } - - container_init operator,(long x) - { - stlt.push_back(x); - return container_init(stlt); - } - - container_init operator,(unsigned long x) - { - stlt.push_back(x); - return container_init(stlt); - } - - container_init operator,(double x) - { - stlt.push_back(x); - return container_init(stlt); - } - - container_init operator,(const symbol & x) - { - stlt.push_back(T(x)); - return container_init(stlt); - } - -private: - container_init(); - STLT & stlt; -}; - /** Wrapper template for making GiNaC classes out of STL containers. */ template