mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-25 21:05:40 +08:00
Summary: Custom containers are only enabled in release mode. Using custom stuff complicates debugging process because it breaks embedded into IDE introspections mechanisms. Reviewed By: mdvacca Differential Revision: D14508299 fbshipit-source-id: d2dbe87764b17d75ccd544c0a4baf03dd9e0cd0b
39 lines
667 B
C++
39 lines
667 B
C++
/**
|
|
* Copyright (c) Facebook, Inc. and its 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 <better/better.h>
|
|
|
|
#if defined(BETTER_USE_FOLLY_CONTAINERS) || __cplusplus < 202000L
|
|
|
|
#include <folly/Optional.h>
|
|
|
|
#else
|
|
|
|
#include <optional>
|
|
|
|
#endif
|
|
|
|
namespace facebook {
|
|
namespace better {
|
|
|
|
#if defined(BETTER_USE_FOLLY_CONTAINERS) || __cplusplus < 202000L
|
|
|
|
template <typename Value>
|
|
using optional = folly::Optional<Value>;
|
|
|
|
#else
|
|
|
|
template <typename Value>
|
|
using optional = std::optional<Value>;
|
|
|
|
#endif
|
|
|
|
} // namespace better
|
|
} // namespace facebook
|