This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/example/doric/yoga/internal/experiments-inl.h
2021-05-20 18:27:45 +08:00

33 lines
670 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 "experiments.h"
#include <bitset>
namespace facebook {
namespace yoga {
namespace internal {
namespace detail {
extern std::bitset<sizeof(int)> enabledExperiments;
} // namespace detail
inline bool isEnabled(Experiment experiment) {
return detail::enabledExperiments.test(static_cast<size_t>(experiment));
}
inline void disableAllExperiments() {
detail::enabledExperiments = 0;
}
} // namespace internal
} // namespace yoga
} // namespace facebook