/*
+ * Copyright (c) 2018 ARM Limited
+ * All rights reserved
+ *
* Copyright (c) 2001-2005 The Regents of The University of Michigan
* All rights reserved.
*
* @{
*
* @name String to number helper functions for signed and unsigned
- * integeral type, as well as floating-point types.
+ * integeral type, as well as enums and floating-point types.
*/
template <class T>
-typename std::enable_if<std::is_integral<T>::value &&
+typename std::enable_if<(std::is_integral<T>::value ||
+ std::is_enum<T>::value) &&
std::is_signed<T>::value, T>::type
__to_number(const std::string &value)
{
}
template <class T>
-typename std::enable_if<std::is_integral<T>::value &&
+typename std::enable_if<(std::is_integral<T>::value ||
+ std::is_enum<T>::value) &&
!std::is_signed<T>::value, T>::type
__to_number(const std::string &value)
{