From: Tom Tromey Date: Sun, 15 Oct 2023 19:40:03 +0000 (-0600) Subject: Use C++17 void_t X-Git-Tag: binutils-2_42~779 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d02f31bb130fd54fa2891cbc28fbc01f603eca6c;p=thirdparty%2Fbinutils-gdb.git Use C++17 void_t C++17 has void_t and make_void, so gdbsupport/traits.h can be simplified. Approved-By: Pedro Alves --- diff --git a/gdbsupport/traits.h b/gdbsupport/traits.h index f6bb64911be..277e117bead 100644 --- a/gdbsupport/traits.h +++ b/gdbsupport/traits.h @@ -43,15 +43,6 @@ namespace gdb { -/* Pre C++14-safe (CWG 1558) version of C++17's std::void_t. See - . */ - -template -struct make_void { typedef void type; }; - -template -using void_t = typename make_void::type; - /* Implementation of the detection idiom: - http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4502.pdf @@ -79,7 +70,7 @@ struct detector /* Implementation of the detection idiom (positive case). */ template class Op, typename... Args> -struct detector>, Op, Args...> +struct detector>, Op, Args...> { using value_t = std::true_type; using type = Op;