• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include "android-modules-utils/sdk_level.h"
18 #include "android-modules-utils/unbounded_sdk_level.h"
19 
20 namespace android {
21 namespace modules {
22 namespace sdklevel {
23 namespace nostl {
24 
25 // This file should be built without libc++. Even without the references below
26 // it should not build while including the library headers if there were unmet
27 // dependencies in the first place, but this guards against moving the
28 // IsAtLeastX methods somewhere else and losing the check.
IsAtLeastR()29 bool IsAtLeastR() { return android::modules::sdklevel::IsAtLeastR(); }
IsAtLeastS()30 bool IsAtLeastS() { return android::modules::sdklevel::IsAtLeastS(); }
IsAtLeastT()31 bool IsAtLeastT() { return android::modules::sdklevel::IsAtLeastT(); }
32 
IsAtLeast(const char * version)33 bool IsAtLeast(const char *version) {
34   return android::modules::sdklevel::unbounded::IsAtLeast(version);
35 };
IsAtMost(const char * version)36 bool IsAtMost(const char *version) {
37   return android::modules::sdklevel::unbounded::IsAtMost(version);
38 };
39 
40 } // namespace nostl
41 } // namespace sdklevel
42 } // namespace modules
43 } // namespace android
44