From 48648a7736aeadb590128d5344927bcfa5b9803b Mon Sep 17 00:00:00 2001
From: Wolfgang Bangerth <bangerth@colostate.edu>
Date: Mon, 30 Nov 2020 19:47:01 -0700
Subject: [PATCH] Mark some variables as constexpr.

These are global variables, and as such should not actually have been declared in
a header file without marking them as 'extern' and providing a definition in a .cc file.
If the compiler had not inlined the definitions of these variables, we would have
gotten duplicate symbol linker errors. C++11 provides us with a way around this:
mark these variables as 'constexpr', thereby avoiding the bug we currently have.
---
 include/deal.II/base/std_cxx17/cmath.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/deal.II/base/std_cxx17/cmath.h b/include/deal.II/base/std_cxx17/cmath.h
index bf0f8e93ba..756ba5ed6e 100644
--- a/include/deal.II/base/std_cxx17/cmath.h
+++ b/include/deal.II/base/std_cxx17/cmath.h
@@ -28,11 +28,11 @@ DEAL_II_NAMESPACE_OPEN
 namespace std_cxx17
 {
 #ifndef DEAL_II_HAVE_CXX17_BESSEL_FUNCTIONS
-  double (&cyl_bessel_j)(double,
-                         double) = boost::math::cyl_bessel_j<double, double>;
-  float (&cyl_bessel_jf)(float,
-                         float)  = boost::math::cyl_bessel_j<float, float>;
-  long double (&cyl_bessel_jl)(long double, long double) =
+  constexpr double (&cyl_bessel_j)(double, double) =
+    boost::math::cyl_bessel_j<double, double>;
+  constexpr float (&cyl_bessel_jf)(float, float) =
+    boost::math::cyl_bessel_j<float, float>;
+  constexpr long double (&cyl_bessel_jl)(long double, long double) =
     boost::math::cyl_bessel_j<long double, long double>;
 #else
   using std::cyl_bessel_j;
-- 
2.39.5