| Index: base/template_util.h
|
| diff --git a/base/template_util.h b/base/template_util.h
|
| index 536cad8f3a3b6f0d77dc7d28076753470d2e90bc..874b8ea508070d9fb46e64bc178a81fe65bb76df 100644
|
| --- a/base/template_util.h
|
| +++ b/base/template_util.h
|
| @@ -42,6 +42,19 @@ template <class T> struct is_non_const_reference<const T&> : std::false_type {};
|
|
|
| namespace internal {
|
|
|
| +template <typename...>
|
| +struct make_void {
|
| + using type = void;
|
| +};
|
| +
|
| +// A clone of C++17 std::void_t.
|
| +// Unlike the original version, we need |make_void| as a helper struct to avoid
|
| +// a C++14 defect.
|
| +// ref: http://en.cppreference.com/w/cpp/types/void_t
|
| +// ref: http://open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1558
|
| +template <typename... Ts>
|
| +using void_t = typename make_void<Ts...>::type;
|
| +
|
| // Uses expression SFINAE to detect whether using operator<< would work.
|
| template <typename T, typename = void>
|
| struct SupportsOstreamOperator : std::false_type {};
|
|
|