Commit 0d57ab79 authored by Dominik Charousset's avatar Dominik Charousset

GCC 4.7 compatibility patch

parent e15c2a72
...@@ -68,8 +68,8 @@ struct ieee_754_trait<std::uint64_t> : ieee_754_trait<double> { }; ...@@ -68,8 +68,8 @@ struct ieee_754_trait<std::uint64_t> : ieee_754_trait<double> { };
template<typename T> template<typename T>
typename ieee_754_trait<T>::packed_type pack754(T f) { typename ieee_754_trait<T>::packed_type pack754(T f) {
using trait = ieee_754_trait<T>; typedef ieee_754_trait<T> trait;
using result_type = typename trait::packed_type; typedef typename trait::packed_type result_type;
// filter special type // filter special type
if (f == trait::zero) return 0; if (f == trait::zero) return 0;
auto significandbits = trait::bits - trait::expbits - 1; // -1 for sign bit auto significandbits = trait::bits - trait::expbits - 1; // -1 for sign bit
...@@ -106,8 +106,8 @@ typename ieee_754_trait<T>::packed_type pack754(T f) { ...@@ -106,8 +106,8 @@ typename ieee_754_trait<T>::packed_type pack754(T f) {
template<typename T> template<typename T>
typename ieee_754_trait<T>::float_type unpack754(T i) { typename ieee_754_trait<T>::float_type unpack754(T i) {
using trait = ieee_754_trait<T>; typedef ieee_754_trait<T> trait;
using result_type = typename trait::float_type; typedef typename trait::float_type result_type;
if (i == 0) return trait::zero; if (i == 0) return trait::zero;
auto significandbits = trait::bits - trait::expbits - 1; // -1 for sign bit auto significandbits = trait::bits - trait::expbits - 1; // -1 for sign bit
// pull the significand // pull the significand
......
...@@ -141,7 +141,7 @@ struct matcher<wildcard_position::in_between, Tuple, T...> { ...@@ -141,7 +141,7 @@ struct matcher<wildcard_position::in_between, Tuple, T...> {
static constexpr size_t wc_pos = static_cast<size_t>(signed_wc_pos); static constexpr size_t wc_pos = static_cast<size_t>(signed_wc_pos);
static_assert( signed_wc_pos > 0 static_assert( signed_wc_pos > 0
&& signed_wc_pos < (sizeof...(T) - 1), && wc_pos < (sizeof...(T) - 1),
"illegal wildcard position"); "illegal wildcard position");
static inline bool tmatch(const Tuple& tup) { static inline bool tmatch(const Tuple& tup) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment