Remove usage of non standard identity struct

std::identity was removed from the standards, but Visual Studio kept
it as an extension.

Replace it by std::remove_reference, which does just a little bit
more than std::identity does, but without impact in this case.
This commit is contained in:
sephiroth99 2017-04-25 03:25:05 -04:00 committed by Doug Johnson
parent 224c779554
commit bc8356bb83
1 changed files with 3 additions and 2 deletions

View File

@ -29,7 +29,8 @@ struct bf {
// For enum values, we strip them down to an underlying type.
typedef
typename std::conditional<std::is_enum<T>::value, std::underlying_type<T>,
std::identity<T>>::type::type value_type;
std::remove_reference<T>>::type::type
value_type;
inline value_type mask() const {
return (((value_type)~0) >> (8 * sizeof(value_type) - n_bits)) << position;
}