/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/v8/src/base/template-meta-programming/common.h
40 строк
1 KB
Michaël Zasso
deps: update V8 to 13.6.233.8
02 май 2025, 16:06
Не верифицирован
02 май 2025, 16:06
918fe04
Код
Авторство
О чём код?
// Copyright 2024 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef V8_BASE_TEMPLATE_META_PROGRAMMING_COMMON_H_ #define V8_BASE_TEMPLATE_META_PROGRAMMING_COMMON_H_ #include <type_traits> #define TYPENAME1 \ template <typename> \ typename namespace v8::base::tmp { template <typename T, typename U> struct equals : std::bool_constant<false> {}; template <typename T> struct equals<T, T> : std::bool_constant<true> {}; template <TYPENAME1 T, TYPENAME1 U> struct equals1 : std::bool_constant<false> {}; template <TYPENAME1 T> struct equals1<T, T> : std::bool_constant<true> {}; template <TYPENAME1 T, typename U> struct instantiate { using type = T<U>; }; template <typename I, TYPENAME1 T> struct is_instantiation_of : std::bool_constant<false> {}; template <typename U, TYPENAME1 T> struct is_instantiation_of<T<U>, T> : std::bool_constant<true> {}; } // namespace v8::base::tmp #undef TYPENAME1 #endif // V8_BASE_TEMPLATE_META_PROGRAMMING_COMMON_H_