diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h b/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h index 56c497cec..4b8503c53 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorIO.h @@ -215,7 +215,6 @@ struct ScalarPrinter struct TensorPrinter { using Scalar = std::remove_const_t; - using ScalarPrinter = ScalarPrinter; static void run(std::ostream& s, const Tensor& tensor, const Format& fmt) { typedef typename Tensor::Index IndexType; @@ -257,7 +256,7 @@ struct TensorPrinter { for (IndexType i = 0; i < total_size; i++) { std::stringstream sstr; sstr.copyfmt(s); - ScalarPrinter::run(sstr, static_cast(tensor.data()[i]), fmt); + ScalarPrinter::run(sstr, static_cast(tensor.data()[i]), fmt); width = std::max(width, IndexType(sstr.str().length())); } } @@ -336,7 +335,7 @@ struct TensorPrinter { // So we don't mess around with formatting, output scalar to a string stream, and adjust the width/fill manually. std::stringstream sstr; sstr.copyfmt(s); - ScalarPrinter::run(sstr, static_cast(tensor.data()[i]), fmt); + ScalarPrinter::run(sstr, static_cast(tensor.data()[i]), fmt); std::string scalar_str = sstr.str(); IndexType scalar_width = scalar_str.length(); if (width && scalar_width < width) { @@ -361,7 +360,6 @@ template struct TensorPrinter> { using Format = TensorIOFormatLegacy; using Scalar = std::remove_const_t; - using ScalarPrinter = ScalarPrinter; static void run(std::ostream& s, const Tensor& tensor, const Format& fmt) { typedef typename Tensor::Index IndexType; @@ -382,7 +380,6 @@ template struct TensorPrinter { static void run(std::ostream& s, const Tensor& tensor, const Format& fmt) { using Scalar = std::remove_const_t; - using ScalarPrinter = ScalarPrinter; std::streamsize explicit_precision; if (fmt.precision == StreamPrecision) { @@ -400,7 +397,7 @@ struct TensorPrinter { std::streamsize old_precision = 0; if (explicit_precision) old_precision = s.precision(explicit_precision); s << fmt.tenPrefix; - ScalarPrinter::run(s, tensor.coeff(0), fmt); + ScalarPrinter::run(s, tensor.coeff(0), fmt); s << fmt.tenSuffix; if (explicit_precision) s.precision(old_precision); }