From: Richard Kreckel Date: Sat, 7 Nov 2015 12:23:26 +0000 (+0100) Subject: Remove C++89 workaround for closing angle brackets in nested templates. X-Git-Tag: release_1-7-0~7^2~60 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=dfaa3383381a37f871cdd8ae7b19db579dddd83d Remove C++89 workaround for closing angle brackets in nested templates. --- diff --git a/check/time_hashmap.cpp b/check/time_hashmap.cpp index 4d065b21..e7c1d258 100644 --- a/check/time_hashmap.cpp +++ b/check/time_hashmap.cpp @@ -82,10 +82,10 @@ unsigned time_hashmap() for (vector::const_iterator i = sizes.begin(); i != sizes.end(); ++i) { double time_insert, time_find, time_erase; - run_timing< exhashmap >(*i, time_insert, time_find, time_erase); + run_timing>(*i, time_insert, time_find, time_erase); // If you like, you can compare it with this: -// run_timing< std::map >(*i, time_insert, time_find, time_erase); +// run_timing>(*i, time_insert, time_find, time_erase); times_insert.push_back(time_insert); times_find.push_back(time_find); diff --git a/doc/CodingStyle b/doc/CodingStyle index 4ac0f189..e387bf29 100644 --- a/doc/CodingStyle +++ b/doc/CodingStyle @@ -208,12 +208,10 @@ after (or before, in the case of postfix '++' and '--') unary operators: x = -(y + z) / 2; There are no spaces around the '<' and '>' used to designate template -parameters. Unfortunately, a design flaw in C++ requires putting a space -between two consecutive closing '>'s. We suggest that in this case you also -put a space after the opening '<': +parameters: vector vi; - vector< list > vli; + vector> vli; '*' and '&' in the declaration of pointer-to and reference-to variables have a space before, but not after them: diff --git a/doc/examples/lanczos.cpp b/doc/examples/lanczos.cpp index d1dce8c1..627bb3f8 100644 --- a/doc/examples/lanczos.cpp +++ b/doc/examples/lanczos.cpp @@ -66,7 +66,7 @@ using namespace cln; * Chebyshev polynomial coefficient matrix as far as is required for * the Lanczos approximation. */ -void calc_chebyshev(vector >& C, const size_t size) +void calc_chebyshev(vector>& C, const size_t size) { C.reserve(size); for (size_t i=0; i >& C, const size_t size) /* * The coefficients p_n(g) that occur in the Lanczos approximation. */ -const cl_F p(const size_t k, const cl_F& g, const vector >& C) +const cl_F p(const size_t k, const cl_F& g, const vector>& C) { const float_format_t prec = float_format(g); const cl_F sqrtPi = sqrt(pi(prec)); @@ -110,7 +110,7 @@ const cl_F p(const size_t k, const cl_F& g, const vector >& C) void calc_lanczos_coeffs(vector& lanc, const cln::cl_F& g) { const size_t n = lanc.size(); - vector > C; + vector> C; calc_chebyshev(C, 2*n+2); // \Pi_{i=1}^n (z-i+1)/(z+i) = \Pi_{i=1}^n (1 - (2i-1)/(z+i)) @@ -118,7 +118,7 @@ void calc_lanczos_coeffs(vector& lanc, const cln::cl_F& g) // Q[1/(z+1),...1/(z+n)] of degree 1. To store coefficients of this // polynomial we use vector, so the set of such polynomials is // stored as - vector > fractions(n); + vector> fractions(n); // xi = 1/(z+i) fractions[0] = vector(1); diff --git a/ginac/container.h b/ginac/container.h index 3c1ac47e..5ba09434 100644 --- a/ginac/container.h +++ b/ginac/container.h @@ -38,7 +38,7 @@ namespace GiNaC { /** Helper template for encapsulating the reserve() mechanics of STL containers. */ -template