From b57ce3ccec41524916f8f7cba3b3e1c9fe02aa5b Mon Sep 17 00:00:00 2001 From: David Wells Date: Fri, 26 Jan 2018 21:41:35 -0500 Subject: [PATCH] Remove some references to older C++ versions. We now require C++11 so these statements are not correct. --- include/deal.II/fe/fe_system.h | 3 +-- include/deal.II/grid/filtered_iterator.h | 20 ++++---------------- include/deal.II/grid/tria.h | 1 - include/deal.II/hp/dof_handler.h | 1 - 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/include/deal.II/fe/fe_system.h b/include/deal.II/fe/fe_system.h index 4f8ae614bf..6411fd99b6 100644 --- a/include/deal.II/fe/fe_system.h +++ b/include/deal.II/fe/fe_system.h @@ -295,8 +295,7 @@ public: * * This code has a problem: it creates four memory leaks because the first * vector above is created with pointers to elements that are allocated with - * new but never destroyed. Without C++11, you would have another - * problem: brace-initializer don't exist in earlier C++ standards. + * new but never destroyed. * * The solution to the second of these problems is to create two static * member functions that can create vectors. Here is an example: diff --git a/include/deal.II/grid/filtered_iterator.h b/include/deal.II/grid/filtered_iterator.h index 3fe1b1064d..06ecd9734e 100644 --- a/include/deal.II/grid/filtered_iterator.h +++ b/include/deal.II/grid/filtered_iterator.h @@ -1289,13 +1289,8 @@ namespace IteratorFilters MaterialIdEqualTo::MaterialIdEqualTo (const types::material_id material_id, const bool only_locally_owned) : - // Note: matrial_ids is a const member and has to be populated with a - // constructor. Unfortunately, C++98/03 does not allow the use of an - // initializer list. Therefore, treat material_id as an array of one - // element. - // This is well defined according to [expr.add].4 (ISO 14882). - material_ids (&material_id, &material_id+1), - only_locally_owned (only_locally_owned) + material_ids {material_id}, + only_locally_owned (only_locally_owned) {} @@ -1327,13 +1322,8 @@ namespace IteratorFilters ActiveFEIndexEqualTo::ActiveFEIndexEqualTo (const unsigned int active_fe_index, const bool only_locally_owned) : - // Note: active_fe_indices is a const member and has to be populated - // with a constructor. Unfortunately, C++98/03 does not allow the use - // of an initializer list. Therefore, treat active_fe_index as an array - // of one element. - // This is well defined according to [expr.add].4 (ISO 14882). - active_fe_indices (&active_fe_index, &active_fe_index+1), - only_locally_owned (only_locally_owned) + active_fe_indices {active_fe_index}, + only_locally_owned (only_locally_owned) {} @@ -1377,5 +1367,3 @@ DEAL_II_NAMESPACE_CLOSE /*------------------------- filtered_iterator.h ------------------------*/ #endif /*------------------------- filtered_iterator.h ------------------------*/ - - diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h index 865e1016e5..2ff64a1b8b 100644 --- a/include/deal.II/grid/tria.h +++ b/include/deal.II/grid/tria.h @@ -2683,7 +2683,6 @@ public: * for (auto cell : triangulation.active_cell_iterators()) * cell->set_user_flag(); * @endcode - * To use this feature, you need a compiler that supports C++11. * * @return The half open range [this->begin_active(), * this->end()) diff --git a/include/deal.II/hp/dof_handler.h b/include/deal.II/hp/dof_handler.h index e5ccb23246..c7aa4c0fb6 100644 --- a/include/deal.II/hp/dof_handler.h +++ b/include/deal.II/hp/dof_handler.h @@ -513,7 +513,6 @@ namespace hp * ...do the local integration on 'cell'...; * } * @endcode - * To use this feature, you need a compiler that supports C++11. * * @return The half open range [this->begin_active(), * this->end()) -- 2.39.5