diff --git a/include/El/blas_like/level1/Fill.hpp b/include/El/blas_like/level1/Fill.hpp index b3ecb6a31f..949f7a1d42 100644 --- a/include/El/blas_like/level1/Fill.hpp +++ b/include/El/blas_like/level1/Fill.hpp @@ -76,7 +76,6 @@ template void Fill( DistSparseMatrix& A, T alpha ) { EL_DEBUG_CSE - const Int m = A.Height(); const Int n = A.Width(); Zero( A ); if( alpha != T(0) ) diff --git a/include/El/blas_like/level1/Scale.hpp b/include/El/blas_like/level1/Scale.hpp index f3e061d26b..e302c3379a 100644 --- a/include/El/blas_like/level1/Scale.hpp +++ b/include/El/blas_like/level1/Scale.hpp @@ -56,8 +56,6 @@ void Scale( S alphaS, Matrix& AReal, Matrix& AImag ) { EL_DEBUG_CSE typedef Complex C; - const Int m = AReal.Height(); - const Int n = AReal.Width(); const C alpha = C(alphaS); if( alpha != C(1) ) { diff --git a/include/El/core.hpp b/include/El/core.hpp index 0f89acaed9..fde84a01e1 100644 --- a/include/El/core.hpp +++ b/include/El/core.hpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/include/El/core/Proxy.hpp b/include/El/core/Proxy.hpp index 01dd342e18..a403aa0175 100644 --- a/include/El/core/Proxy.hpp +++ b/include/El/core/Proxy.hpp @@ -76,7 +76,7 @@ class MatrixWriteProxy ~MatrixWriteProxy() { - if( !uncaught_exception() ) + if( !has_uncaught_exception() ) Copy( *prox_, orig_ ); delete prox_; } @@ -116,7 +116,7 @@ class MatrixReadWriteProxy ~MatrixReadWriteProxy() { - if( !uncaught_exception() ) + if( !has_uncaught_exception() ) Copy( *prox_, orig_ ); delete prox_; } @@ -506,7 +506,7 @@ class DistMatrixWriteProxy ~DistMatrixWriteProxy() { - if( !uncaught_exception() ) + if( !has_uncaught_exception() ) Copy( *prox_, orig_ ); delete prox_; } @@ -568,7 +568,7 @@ class DistMatrixWriteProxy { if( madeCopy_ ) { - if( !uncaught_exception() ) + if( !has_uncaught_exception() ) Copy( *prox_, orig_ ); delete prox_; } @@ -606,7 +606,7 @@ class DistMatrixWriteProxy ~DistMatrixWriteProxy() { - if( !uncaught_exception() ) + if( !has_uncaught_exception() ) Copy( *prox_, orig_ ); delete prox_; } @@ -676,7 +676,7 @@ class DistMatrixWriteProxy { if( madeCopy_ ) { - if( !uncaught_exception() ) + if( !has_uncaught_exception() ) Copy( *prox_, orig_ ); delete prox_; } @@ -718,7 +718,7 @@ class DistMatrixReadWriteProxy ~DistMatrixReadWriteProxy() { - if( !uncaught_exception() ) + if( !has_uncaught_exception() ) Copy( *prox_, orig_ ); delete prox_; } @@ -780,7 +780,7 @@ class DistMatrixReadWriteProxy { if( madeCopy_ ) { - if( !uncaught_exception() ) + if( !has_uncaught_exception() ) Copy( *prox_, orig_ ); delete prox_; } @@ -818,7 +818,7 @@ class DistMatrixReadWriteProxy ~DistMatrixReadWriteProxy() { - if( !uncaught_exception() ) + if( !has_uncaught_exception() ) Copy( *prox_, orig_ ); delete prox_; } @@ -888,7 +888,7 @@ class DistMatrixReadWriteProxy { if( madeCopy_ ) { - if( !uncaught_exception() ) + if( !has_uncaught_exception() ) Copy( *prox_, orig_ ); delete prox_; } diff --git a/include/El/core/environment/decl.hpp b/include/El/core/environment/decl.hpp index 81974bbae1..05d8053a55 100644 --- a/include/El/core/environment/decl.hpp +++ b/include/El/core/environment/decl.hpp @@ -35,7 +35,14 @@ using std::ostream; using std::ostringstream; using std::exception; -using std::uncaught_exception; +inline bool has_uncaught_exception() EL_NO_EXCEPT +{ +#ifdef __cpp_lib_uncaught_exceptions + return std::uncaught_exceptions() > 0; +#else + return std::uncaught_exception(); +#endif +} void PrintVersion( ostream& os=cout ); void PrintConfig( ostream& os=cout ); @@ -251,12 +258,12 @@ EL_DEBUG_ONLY( public: CallStackEntry( string s ) { - if( !uncaught_exception() ) + if( !has_uncaught_exception() ) PushCallStack(s); } ~CallStackEntry() { - if( !uncaught_exception() ) + if( !has_uncaught_exception() ) PopCallStack(); } };