/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/ReactCommon/react/utils/to_underlying.h
22 строки
507 B
Nick Gerleman
Add CSSValueVariant and parseCSSValue()
14 фев 2024, 07:13
14 фев 2024, 07:13
7e47df0
Код
Авторство
О чём код?
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <type_traits> namespace facebook::react { /** * Polyfill of C++ 23 to_underlying() * https://en.cppreference.com/w/cpp/utility/to_underlying */ constexpr auto to_underlying(auto e) noexcept { return static_cast<std::underlying_type_t<decltype(e)>>(e); } } // namespace facebook::react