]> www.ginac.de Git - ginac.git/blobdiff - ginac/matrix.h
Remove deprecated initialization via overloaded comma operator.
[ginac.git] / ginac / matrix.h
index 44351d65885f6f11b755fa08b4476302c05fc087..eb3c40c674043fb3331b3ee328e91eaea3d20250 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to symbolic matrices */
 
 /*
- *  GiNaC Copyright (C) 1999-2018 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2020 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
 
 namespace GiNaC {
 
-/** Helper template to allow initialization of matrices via an overloaded
- *  comma operator (idea stolen from Blitz++). */
-template <typename T, typename It>
-class matrix_init {
-public:
-       matrix_init(It i) : iter(i) {}
-
-       matrix_init<T, It> operator,(const T & x)
-       {
-               *iter = x;
-               return matrix_init<T, It>(++iter);
-       }
-
-       // The following specializations produce much tighter code than the
-       // general case above
-
-       matrix_init<T, It> operator,(int x)
-       {
-               *iter = T(x);
-               return matrix_init<T, It>(++iter);
-       }
-
-       matrix_init<T, It> operator,(unsigned int x)
-       {
-               *iter = T(x);
-               return matrix_init<T, It>(++iter);
-       }
-
-       matrix_init<T, It> operator,(long x)
-       {
-               *iter = T(x);
-               return matrix_init<T, It>(++iter);
-       }
-
-       matrix_init<T, It> operator,(unsigned long x)
-       {
-               *iter = T(x);
-               return matrix_init<T, It>(++iter);
-       }
-
-       matrix_init<T, It> operator,(double x)
-       {
-               *iter = T(x);
-               return matrix_init<T, It>(++iter);
-       }
-
-       matrix_init<T, It> operator,(const symbol & x)
-       {
-               *iter = T(x);
-               return matrix_init<T, It>(++iter);
-       }
-
-private:
-       matrix_init();
-       It iter;
-};
-
-
 /** Symbolic matrices. */
 class matrix : public basic
 {
@@ -102,7 +44,6 @@ public:
        matrix(unsigned r, unsigned c, const lst & l);
        matrix(std::initializer_list<std::initializer_list<ex>> l);
 
-       matrix_init<ex, exvector::iterator> operator=(const ex & x) attribute_deprecated;
 protected:
        matrix(unsigned r, unsigned c, const exvector & m2);
        matrix(unsigned r, unsigned c, exvector && m2);
@@ -177,14 +118,6 @@ protected:
 };
 GINAC_DECLARE_UNARCHIVER(matrix); 
 
-// First step of initialization of matrix with a comma-separated sequence
-// of expressions. Subsequent steps are handled by matrix_init<>::operator,().
-inline matrix_init<ex, exvector::iterator> matrix::operator=(const ex & x)
-{
-       m[0] = x;
-       return matrix_init<ex, exvector::iterator>(++m.begin());
-}
-
 // wrapper functions around member functions
 
 inline size_t nops(const matrix & m)