Files
react-native/ReactCommon/better/optional.h
Valentin Shergin e3f9d7e82c Fabric: Disabling custom ("better") containers in DEBUG mode
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
2019-03-20 09:24:59 -07:00

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