Skip to content

Commit

Permalink
crc: bump some constexpr to C++14 to fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Dorniak committed Jun 27, 2024
1 parent 3e16709 commit ac8def7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/etl/private/crc_implementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ namespace etl
template <typename TAccumulator, size_t Accumulator_Bits, size_t Chunk_Bits, uint8_t Chunk_Mask, bool Reflect>
static
typename etl::enable_if<(Accumulator_Bits > Chunk_Bits) && Reflect, TAccumulator>::type
ETL_CONSTEXPR crc_update_chunk(TAccumulator crc, uint8_t value, const TAccumulator table[])
ETL_CONSTEXPR14 crc_update_chunk(TAccumulator crc, uint8_t value, const TAccumulator table[])
{
value &= Chunk_Mask;

Expand Down Expand Up @@ -608,14 +608,14 @@ namespace etl
typedef accumulator_type value_type;

//*************************************************************************
ETL_CONSTEXPR accumulator_type initial() const
ETL_CONSTEXPR14 accumulator_type initial() const
{
return TCrcParameters::Reflect ? etl::reverse_bits_const<accumulator_type, TCrcParameters::Initial>::value
: TCrcParameters::Initial;
}

//*************************************************************************
ETL_CONSTEXPR accumulator_type final(accumulator_type crc) const
ETL_CONSTEXPR14 accumulator_type final(accumulator_type crc) const
{
return crc ^ TCrcParameters::Xor_Out;
}
Expand All @@ -636,7 +636,7 @@ namespace etl
typedef accumulator_type value_type;

//*************************************************************************
ETL_CONSTEXPR accumulator_type initial() const
ETL_CONSTEXPR14 accumulator_type initial() const
{
return TCrcParameters::Reflect ? etl::reverse_bits_const<accumulator_type, TCrcParameters::Initial>::value
: TCrcParameters::Initial;
Expand Down Expand Up @@ -664,7 +664,7 @@ namespace etl
typedef accumulator_type value_type;

//*************************************************************************
ETL_CONSTEXPR accumulator_type initial() const
ETL_CONSTEXPR14 accumulator_type initial() const
{
return TCrcParameters::Reflect ? etl::reverse_bits_const<accumulator_type, TCrcParameters::Initial>::value
: TCrcParameters::Initial;
Expand Down

0 comments on commit ac8def7

Please sign in to comment.