fixup! [M120 Migration] Notify media device state to webbrowser
[platform/framework/web/chromium-efl.git] / base / cxx20_is_constant_evaluated.h
1 // Copyright 2022 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_CXX20_IS_CONSTANT_EVALUATED_H_
6 #define BASE_CXX20_IS_CONSTANT_EVALUATED_H_
7
8 namespace base {
9
10 // Implementation of C++20's std::is_constant_evaluated.
11 //
12 // References:
13 // - https://en.cppreference.com/w/cpp/types/is_constant_evaluated
14 // - https://wg21.link/meta.const.eval
15 constexpr bool is_constant_evaluated() noexcept {
16   return __builtin_is_constant_evaluated();
17 }
18
19 }  // namespace base
20
21 #endif  // BASE_CXX20_IS_CONSTANT_EVALUATED_H_