From: Daniel Arndt Date: Tue, 5 Jun 2018 22:05:10 +0000 (+0200) Subject: Use static constexpr in VectorizedArray X-Git-Tag: v9.1.0-rc1~1071^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f36af9e5db61656fe451482d6e2ff764f4aad29b;p=dealii.git Use static constexpr in VectorizedArray --- diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index a8fce5a589..69fbc5f186 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -162,7 +162,7 @@ public: /** * This gives the number of vectors collected in this class. */ - static const unsigned int n_array_elements = 1; + static constexpr unsigned int n_array_elements = 1; // POD means that there should be no user-defined constructors, destructors // and copy functions (the standard is somewhat relaxed in C++2011, though). @@ -568,7 +568,7 @@ public: /** * This gives the number of vectors collected in this class. */ - static const unsigned int n_array_elements = 8; + static constexpr unsigned int n_array_elements = 8; /** * This function can be used to set all data fields to a given scalar. @@ -970,7 +970,7 @@ public: /** * This gives the number of vectors collected in this class. */ - static const unsigned int n_array_elements = 16; + static constexpr unsigned int n_array_elements = 16; /** * This function can be used to set all data fields to a given scalar. @@ -1405,7 +1405,7 @@ public: /** * This gives the number of vectors collected in this class. */ - static const unsigned int n_array_elements = 4; + static constexpr unsigned int n_array_elements = 4; /** * This function can be used to set all data fields to a given scalar. @@ -1784,7 +1784,7 @@ public: /** * This gives the number of vectors collected in this class. */ - static const unsigned int n_array_elements = 8; + static constexpr unsigned int n_array_elements = 8; /** * This function can be used to set all data fields to a given scalar. @@ -2194,7 +2194,7 @@ public: /** * This gives the number of vectors collected in this class. */ - static const unsigned int n_array_elements = 2; + static constexpr unsigned int n_array_elements = 2; /** * This function can be used to set all data fields to a given scalar. @@ -2532,7 +2532,7 @@ public: /** * This gives the number of vectors collected in this class. */ - static const unsigned int n_array_elements = 4; + static constexpr unsigned int n_array_elements = 4; /** * This function can be used to set all data fields to a given scalar.