diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-02-16 02:10:10 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-02-18 02:15:25 +0200 |
commit | b5eff18f1aef980fa7eb55184996710a6fc9523e (patch) | |
tree | 65625ff6322213128f7311e278dd5d48d63a83b7 /include/libcamera/bound_method.h | |
parent | 68daa9302f90833ce345cb33ffcf075f23cbfc9a (diff) |
libcamera: Use C++14 std::*_t type traits
C++14 introduced useful type traits helpers named std::*_t as aliases to
std::*<...>::type. Use them to simplify the code.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include/libcamera/bound_method.h')
-rw-r--r-- | include/libcamera/bound_method.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/libcamera/bound_method.h b/include/libcamera/bound_method.h index 7ffd2e42..983bb5cb 100644 --- a/include/libcamera/bound_method.h +++ b/include/libcamera/bound_method.h @@ -38,7 +38,7 @@ public: { } - std::tuple<typename std::remove_reference<Args>::type...> args_; + std::tuple<typename std::remove_reference_t<Args>...> args_; R ret_; }; @@ -51,7 +51,7 @@ public: { } - std::tuple<typename std::remove_reference<Args>::type...> args_; + std::tuple<typename std::remove_reference_t<Args>...> args_; }; class BoundMethodBase @@ -63,7 +63,7 @@ public: } virtual ~BoundMethodBase() {} - template<typename T, typename std::enable_if<!std::is_same<Object, T>::value>::type * = nullptr> + template<typename T, typename std::enable_if_t<!std::is_same<Object, T>::value> * = nullptr> bool match(T *obj) { return obj == obj_; } bool match(Object *object) { return object == object_; } |