misc: Replace type_traits.hh XX::value with XX_v.

Now that we're using c++17, the type_traits with a ::value member have
a _v alias which reduces verbosity. Or on other words

std::is_integral<T>::value

can be replaced with

std::is_integral_v<T>

Make this substitution throughout the code base. In places where gem5
introduced it's own similar templates, add a V alias, spelled
differently to match gem5's internal style.

gem5: :IsVarArgs<T>::value => gem5::IsVarArgsV<T>
Change-Id: I1d84ffc4a236ad699471569e7916ec17fe5f109a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48604
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-07-26 17:03:30 -07:00
parent 8b53b8bcdf
commit b3b81196aa
45 changed files with 256 additions and 237 deletions

View File

@@ -854,8 +854,8 @@ module_init(py::module_ &m_internal)
# constructor.
code('template <class CxxClass>')
code('class Dummy${cls}Shunt<CxxClass, std::enable_if_t<')
code(' std::is_constructible<CxxClass,')
code(' const ${cls}Params &>::value>>')
code(' std::is_constructible_v<CxxClass,')
code(' const ${cls}Params &>>>')
code('{')
code(' public:')
code(' using Params = ${cls}Params;')
@@ -871,8 +871,8 @@ module_init(py::module_ &m_internal)
# not exist.
code('template <class CxxClass>')
code('class Dummy${cls}Shunt<CxxClass, std::enable_if_t<')
code(' !std::is_constructible<CxxClass,')
code(' const ${cls}Params &>::value>>')
code(' !std::is_constructible_v<CxxClass,')
code(' const ${cls}Params &>>>')
code('{')
code(' public:')
code(' using Params = Dummy${cls}ParamsClass;')