Use the verbose type_trait check in Opcode.h

This commit is contained in:
Paul Fd 2020-03-10 13:36:20 +01:00
parent 20475047a1
commit f541179864

View file

@ -45,7 +45,7 @@ struct Opcode {
* @param validRange the range of admitted values
* @return absl::optional<ValueType> the cast value, or null
*/
template <typename ValueType, std::enable_if_t<std::is_integral<ValueType>::value, int> = 0>
template <typename ValueType, typename std::enable_if<std::is_integral<ValueType>::value, int>::type = 0>
inline absl::optional<ValueType> readOpcode(absl::string_view value, const Range<ValueType>& validRange)
{
int64_t returnedValue;
@ -74,7 +74,7 @@ inline absl::optional<ValueType> readOpcode(absl::string_view value, const Range
* @param validRange the range of admitted values
* @return absl::optional<ValueType> the cast value, or null
*/
template <typename ValueType, std::enable_if_t<std::is_floating_point<ValueType>::value, int> = 0>
template <typename ValueType, typename std::enable_if<std::is_floating_point<ValueType>::value, int>::type = 0>
inline absl::optional<ValueType> readOpcode(absl::string_view value, const Range<ValueType>& validRange)
{
float returnedValue;