From 1c27f907a54babfc214d23de15a826aa704e606b Mon Sep 17 00:00:00 2001 From: Nicolas Clauvelin Date: Fri, 23 Feb 2018 06:15:58 -0500 Subject: [PATCH] FIXES CONSTEXPR STATIC ISSUE WITH GCC 4.8.X See https://github.com/sendyne/cppreg/issues/2 for a detailed explanation. This closes #2. --- register/ShadowValue.h | 7 ++++++- single/cppreg-all.h | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/register/ShadowValue.h b/register/ShadowValue.h index 91e9727..e4a82be 100644 --- a/register/ShadowValue.h +++ b/register/ShadowValue.h @@ -35,6 +35,8 @@ namespace cppreg { * @tparam Register Register type. * * This implementation is for register which do require shadow value. + * + * See */ template struct Shadow { @@ -42,7 +44,10 @@ namespace cppreg { constexpr static const bool use_shadow = true; }; template - typename Register::type Shadow::value = Register::reset; + typename Register::type Shadow::value = + Register::reset; + template + constexpr const bool Shadow::use_shadow; } diff --git a/single/cppreg-all.h b/single/cppreg-all.h index 4cf9b9b..445f0a5 100644 --- a/single/cppreg-all.h +++ b/single/cppreg-all.h @@ -133,7 +133,10 @@ namespace cppreg { constexpr static const bool use_shadow = true; }; template - typename Register::type Shadow::value = Register::reset; + typename Register::type Shadow::value = + Register::reset; + template + constexpr const bool Shadow::use_shadow; } #endif