1
0
mirror of https://github.com/sendyne/cppreg.git synced 2025-05-09 15:14:05 +00:00

FIXES CONSTEXPR STATIC ISSUE WITH GCC 4.8.X

See https://github.com/sendyne/cppreg/issues/2 for a detailed explanation.

This closes #2.
This commit is contained in:
Nicolas Clauvelin 2018-02-23 06:15:58 -05:00
parent 816c579d7d
commit 1c27f907a5
2 changed files with 10 additions and 2 deletions

View File

@ -35,6 +35,8 @@ namespace cppreg {
* @tparam Register Register type.
*
* This implementation is for register which do require shadow value.
*
* See
*/
template <typename Register>
struct Shadow<Register, true> {
@ -42,7 +44,10 @@ namespace cppreg {
constexpr static const bool use_shadow = true;
};
template <typename Register>
typename Register::type Shadow<Register, true>::value = Register::reset;
typename Register::type Shadow<Register, true>::value =
Register::reset;
template <typename Register>
constexpr const bool Shadow<Register, true>::use_shadow;
}

View File

@ -133,7 +133,10 @@ namespace cppreg {
constexpr static const bool use_shadow = true;
};
template <typename Register>
typename Register::type Shadow<Register, true>::value = Register::reset;
typename Register::type Shadow<Register, true>::value =
Register::reset;
template <typename Register>
constexpr const bool Shadow<Register, true>::use_shadow;
}
#endif