From 2f900cab8a1e9533f88f9de5e6b0013bf87adbd7 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 7 Apr 2017 17:11:11 +0200 Subject: [PATCH] Clean base/ directory --- include/deal.II/base/aligned_vector.h | 12 ------- include/deal.II/base/config.h.in | 10 ------ include/deal.II/base/index_set.h | 6 +--- include/deal.II/base/quadrature.h | 5 --- include/deal.II/base/quadrature_lib.h | 4 --- include/deal.II/base/quadrature_point_data.h | 7 ---- include/deal.II/base/std_cxx11/bind.h | 2 +- include/deal.II/base/subscriptor.h | 4 --- include/deal.II/base/symmetric_tensor.h | 17 ---------- include/deal.II/base/table.h | 16 --------- include/deal.II/base/tensor.h | 17 +--------- include/deal.II/base/tensor_accessors.h | 4 --- include/deal.II/base/thread_management.h | 5 +-- include/deal.II/base/vectorization.h | 35 -------------------- include/deal.II/matrix_free/operators.h | 4 --- source/base/subscriptor.cc | 10 +----- 16 files changed, 5 insertions(+), 153 deletions(-) diff --git a/include/deal.II/base/aligned_vector.h b/include/deal.II/base/aligned_vector.h index 9d85220127..f4de6d563b 100644 --- a/include/deal.II/base/aligned_vector.h +++ b/include/deal.II/base/aligned_vector.h @@ -91,15 +91,11 @@ public: */ AlignedVector (const AlignedVector &vec); -#ifdef DEAL_II_WITH_CXX11 /** * Move constructor. Create a new aligned vector by stealing the contents of * @p vec. - * - * @note This constructor is only available if deal.II is built with C++11. */ AlignedVector (AlignedVector &&vec); -#endif /** * Assignment to the input vector @p vec. @@ -109,15 +105,11 @@ public: AlignedVector & operator = (const AlignedVector &vec); -#ifdef DEAL_II_WITH_CXX11 /** * Move assignment operator. - * - * @note This operator is only available if deal.II is built with C++11. */ AlignedVector & operator = (AlignedVector &&vec); -#endif /** * Change the size of the vector. It keeps old elements previously available @@ -525,7 +517,6 @@ AlignedVector::AlignedVector (const AlignedVector &vec) -#ifdef DEAL_II_WITH_CXX11 template < class T > inline AlignedVector::AlignedVector (AlignedVector &&vec) @@ -538,7 +529,6 @@ AlignedVector::AlignedVector (AlignedVector &&vec) vec._end_data = nullptr; vec._end_allocated = nullptr; } -#endif @@ -555,7 +545,6 @@ AlignedVector::operator = (const AlignedVector &vec) -#ifdef DEAL_II_WITH_CXX11 template < class T > inline AlignedVector & @@ -573,7 +562,6 @@ AlignedVector::operator = (AlignedVector &&vec) return *this; } -#endif diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index b063f0177a..fec20fbfb5 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -311,16 +311,6 @@ _Pragma("GCC diagnostic pop") #endif -/** - * BOOST can falsely detect cxx11 support and will try to use - * variadic templates even when we disable cxx11. This would create - * a ton of warnings, so we tell boost to not use them in this case. - */ -#ifndef DEAL_II_WITH_CXX11 -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif - - /*********************************************************************** * Final inclusions: */ diff --git a/include/deal.II/base/index_set.h b/include/deal.II/base/index_set.h index 73583035e8..2e4864fa34 100644 --- a/include/deal.II/base/index_set.h +++ b/include/deal.II/base/index_set.h @@ -108,7 +108,6 @@ public: */ explicit IndexSet (const size_type size); -#ifdef DEAL_II_WITH_CXX11 /** * Copy constructor. */ @@ -130,7 +129,6 @@ public: * the current one. */ IndexSet &operator= (IndexSet &&is); -#endif #ifdef DEAL_II_WITH_TRILINOS /** @@ -1348,8 +1346,6 @@ IndexSet::IndexSet (const size_type size) -#ifdef DEAL_II_WITH_CXX11 - inline IndexSet::IndexSet (IndexSet &&is) : @@ -1367,6 +1363,7 @@ IndexSet::IndexSet (IndexSet &&is) } + inline IndexSet &IndexSet::operator= (IndexSet &&is) { @@ -1385,7 +1382,6 @@ IndexSet &IndexSet::operator= (IndexSet &&is) return *this; } -#endif inline diff --git a/include/deal.II/base/quadrature.h b/include/deal.II/base/quadrature.h index 8cff4b7639..46daf6715e 100644 --- a/include/deal.II/base/quadrature.h +++ b/include/deal.II/base/quadrature.h @@ -125,16 +125,11 @@ public: */ Quadrature (const Quadrature &q); -#ifdef DEAL_II_WITH_CXX11 /** * Move constructor. Construct a new quadrature object by transferring the * internal data of another quadrature object. - * - * @note this constructor is only available if deal.II is configured with - * C++11 support. */ Quadrature (Quadrature &&) = default; -#endif /** * Construct a quadrature formula from given vectors of quadrature points diff --git a/include/deal.II/base/quadrature_lib.h b/include/deal.II/base/quadrature_lib.h index 144c010801..5d9bd4d43d 100644 --- a/include/deal.II/base/quadrature_lib.h +++ b/include/deal.II/base/quadrature_lib.h @@ -295,13 +295,11 @@ public: const double alpha = 1, const bool factor_out_singular_weight=false); -#ifdef DEAL_II_WITH_CXX11 /** * Move constructor. We cannot rely on the move constructor for `Quadrature`, * since it does not know about the additional member `fraction` of this class. */ QGaussLogR(QGaussLogR &&) = default; -#endif protected: /** @@ -600,13 +598,11 @@ public: QGaussRadauChebyshev(const unsigned int n, EndPoint ep=QGaussRadauChebyshev::left); -#ifdef DEAL_II_WITH_CXX11 /** * Move constructor. We cannot rely on the move constructor for `Quadrature`, * since it does not know about the additional member `ep` of this class. */ QGaussRadauChebyshev(QGaussRadauChebyshev &&) = default; -#endif private: const EndPoint ep; diff --git a/include/deal.II/base/quadrature_point_data.h b/include/deal.II/base/quadrature_point_data.h index 8db1175937..cb1299d8e2 100644 --- a/include/deal.II/base/quadrature_point_data.h +++ b/include/deal.II/base/quadrature_point_data.h @@ -16,11 +16,8 @@ #ifndef dealii__quadrature_point_data_h #define dealii__quadrature_point_data_h -// must include config before checking for DEAL_II_WITH_CXX11 #include -#ifdef DEAL_II_WITH_CXX11 - #include #include #include @@ -52,8 +49,6 @@ DEAL_II_NAMESPACE_OPEN * For this reason, this class may not be sufficiently flexible when, for example, * adopting a level-set approach to describe material behavior. * - * @note This class is only available if deal.II is configured with C++11 support. - * * @author Denis Davydov, Jean-Paul Pelteret, 2016 */ template @@ -858,6 +853,4 @@ namespace parallel #endif // DOXYGEN DEAL_II_NAMESPACE_CLOSE -#endif // CXX11 - #endif diff --git a/include/deal.II/base/std_cxx11/bind.h b/include/deal.II/base/std_cxx11/bind.h index f4ae73223f..496152c979 100644 --- a/include/deal.II/base/std_cxx11/bind.h +++ b/include/deal.II/base/std_cxx11/bind.h @@ -25,7 +25,7 @@ DEAL_II_NAMESPACE_OPEN // In boost, the placeholders _1, _2, ... are in the global namespace. In // C++11, they are in namespace std::placeholders, which makes them awkward to -// use. Import them into the dealii::std_cxx11 namespace instead and do them +// use. Import them into the dealii::std_cxx11 namespace instead and do the // same below if we use boost instead. Namespace 'placeholders' is also defined // in dealii::std_cxx11 namespace to make code C++ standard compatible. // That is to say, if std::something works with C++11 standard, diff --git a/include/deal.II/base/subscriptor.h b/include/deal.II/base/subscriptor.h index 07b2d1e29c..4e13aef717 100644 --- a/include/deal.II/base/subscriptor.h +++ b/include/deal.II/base/subscriptor.h @@ -69,7 +69,6 @@ public: */ Subscriptor(const Subscriptor &); -#ifdef DEAL_II_WITH_CXX11 /** * Move constructor. * @@ -77,7 +76,6 @@ public: * objects are subscribing to it. */ Subscriptor(Subscriptor &&); -#endif /** * Destructor, asserting that the counter is zero. @@ -92,14 +90,12 @@ public: */ Subscriptor &operator = (const Subscriptor &); -#ifdef DEAL_II_WITH_CXX11 /** * Move assignment operator. * * Asserts that the counter for the moved object is zero. */ Subscriptor &operator = (Subscriptor &&); -#endif /** * Subscribes a user of the object. The subscriber may be identified by text diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index f83ff04cab..9a26bcc8d6 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -2872,23 +2872,6 @@ operator * (const Number factor, } -#ifndef DEAL_II_WITH_CXX11 - -template -struct ProductType > -{ - typedef SymmetricTensor::type> type; -}; - -template -struct ProductType,U> -{ - typedef SymmetricTensor::type> type; -}; - -#endif - - /** * Multiplication of a symmetric tensor with a scalar number from the right. diff --git a/include/deal.II/base/table.h b/include/deal.II/base/table.h index 62e4f03016..4d98edf541 100644 --- a/include/deal.II/base/table.h +++ b/include/deal.II/base/table.h @@ -444,14 +444,10 @@ public: template TableBase (const TableBase &src); -#ifdef DEAL_II_WITH_CXX11 /** * Move constructor. Transfers the contents of another Table. - * - * @note This constructor is only available if deal.II is built with C++11. */ TableBase (TableBase &&src); -#endif /** * Destructor. Free allocated memory. @@ -478,15 +474,11 @@ public: template TableBase &operator = (const TableBase &src); -#ifdef DEAL_II_WITH_CXX11 /** * Move assignment operator. Transfer all elements of src into the * table. - * - * @note This operator is only available if deal.II is built with C++11. */ TableBase &operator = (TableBase &&src); -#endif /** * Test for equality of two tables. @@ -1668,8 +1660,6 @@ TableBase::TableBase (const TableBase &src) -#ifdef DEAL_II_WITH_CXX11 - template TableBase::TableBase (TableBase &&src) : @@ -1680,8 +1670,6 @@ TableBase::TableBase (TableBase &&src) src.table_size = TableIndices(); } -#endif - template @@ -1882,8 +1870,6 @@ TableBase::operator = (const TableBase &m) -#ifdef DEAL_II_WITH_CXX11 - template inline TableBase & @@ -1897,8 +1883,6 @@ TableBase::operator = (TableBase &&m) return *this; } -#endif - template diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index 2e7b69f569..39ba02107e 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -1146,22 +1146,6 @@ std::ostream &operator << (std::ostream &out, const Tensor<0,dim,Number> &p) //@{ -#ifndef DEAL_II_WITH_CXX11 -template -struct ProductType > -{ - typedef Tensor::type> type; -}; - -template -struct ProductType,U> -{ - typedef Tensor::type> type; -}; -#endif - - - /** * Scalar multiplication of a tensor of rank 0 with an object from the left. * @@ -1180,6 +1164,7 @@ operator * (const Other object, } + /** * Scalar multiplication of a tensor of rank 0 with an object from the right. * diff --git a/include/deal.II/base/tensor_accessors.h b/include/deal.II/base/tensor_accessors.h index e1a3d44840..89720cb856 100644 --- a/include/deal.II/base/tensor_accessors.h +++ b/include/deal.II/base/tensor_accessors.h @@ -185,10 +185,8 @@ namespace TensorAccessors internal::ReorderedIndexView reordered_index_view(T &t) { -#ifdef DEAL_II_WITH_CXX11 static_assert(0 <= index && index < rank, "The specified index must lie within the range [0,rank)"); -#endif return internal::ReorderedIndexView(t); } @@ -266,14 +264,12 @@ namespace TensorAccessors inline DEAL_II_ALWAYS_INLINE void contract(T1 &result, const T2 &left, const T3 &right) { -#ifdef DEAL_II_WITH_CXX11 static_assert(rank_1 >= no_contr, "The rank of the left tensor must be " "equal or greater than the number of " "contractions"); static_assert(rank_2 >= no_contr, "The rank of the right tensor must be " "equal or greater than the number of " "contractions"); -#endif internal::Contract::template contract (result, left, right); diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index 5d59d94219..d4833cf784 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -1746,7 +1746,6 @@ namespace Threads } -#ifdef DEAL_II_WITH_CXX11 /** * Overload of the new_thread() function for objects that can be called like a @@ -1821,7 +1820,6 @@ namespace Threads return Thread(std::function(function_object)); } -#endif /** @@ -3212,7 +3210,6 @@ namespace Threads } -#ifdef DEAL_II_WITH_CXX11 /** * Overload of the new_task function for objects that can be called like a @@ -3287,7 +3284,7 @@ namespace Threads return Task(std::function(function_object)); } -#endif + /** * Overload of the new_task function for non-member or static member diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 7d42955f64..5983ec7546 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -85,41 +85,6 @@ struct EnableIfScalar > -#ifndef DEAL_II_WITH_CXX11 -// Specify the types for the implemented multiplications explicitly - -template -struct ProductType > -{ - typedef VectorizedArray type; -}; - -template -struct ProductType, Number> -{ - typedef VectorizedArray type; -}; - -// In contrast to scalar types for which the product of a float and a double -// variable would be a double variable, the implemented type here really is -// VectorizedArray. Since VectorizedArray is only half as -// wide as VectorizedArray, we would have to throw away half of the -// vector otherwise. -template<> -struct ProductType > -{ - typedef VectorizedArray type; -}; - -template<> -struct ProductType, double> -{ - typedef VectorizedArray type; -}; -#endif - - - /** * This generic class defines a unified interface to a vectorized data type. * For general template arguments, this class simply corresponds to the diff --git a/include/deal.II/matrix_free/operators.h b/include/deal.II/matrix_free/operators.h index d8e6ccf46d..c3842933c4 100644 --- a/include/deal.II/matrix_free/operators.h +++ b/include/deal.II/matrix_free/operators.h @@ -1433,12 +1433,10 @@ namespace MatrixFreeOperators MGInterfaceOperator::vmult (VectorType &dst, const VectorType &src) const { -#ifdef DEAL_II_WITH_CXX11 #ifndef DEAL_II_MSVC static_assert (std::is_same::value, "The vector type must be based on the same value type as this" "operator"); -#endif #endif Assert(mf_base_operator != NULL, @@ -1455,12 +1453,10 @@ namespace MatrixFreeOperators MGInterfaceOperator::Tvmult (VectorType &dst, const VectorType &src) const { -#ifdef DEAL_II_WITH_CXX11 #ifndef DEAL_II_MSVC static_assert (std::is_same::value, "The vector type must be based on the same value type as this" "operator"); -#endif #endif Assert(mf_base_operator != NULL, diff --git a/source/base/subscriptor.cc b/source/base/subscriptor.cc index 3d78476968..e0ed16198e 100644 --- a/source/base/subscriptor.cc +++ b/source/base/subscriptor.cc @@ -63,7 +63,6 @@ Subscriptor::Subscriptor (const Subscriptor &) -#ifdef DEAL_II_WITH_CXX11 Subscriptor::Subscriptor (Subscriptor &&subscriptor) : counter(0), @@ -71,19 +70,13 @@ Subscriptor::Subscriptor (Subscriptor &&subscriptor) { subscriptor.check_no_subscribers(); } -#endif Subscriptor::~Subscriptor () { check_no_subscribers(); - -#ifdef DEAL_II_WITH_CXX11 object_info = nullptr; -#else - object_info = 0; -#endif } @@ -159,14 +152,13 @@ Subscriptor &Subscriptor::operator = (const Subscriptor &s) -#ifdef DEAL_II_WITH_CXX11 Subscriptor &Subscriptor::operator = (Subscriptor &&s) { s.check_no_subscribers(); object_info = s.object_info; return *this; } -#endif + void -- 2.39.5