xref: /aosp_15_r20/external/angle/build/rust/tests/bindgen_cpp_test/cpp.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 // Copyright 2024 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 BUILD_RUST_TESTS_BINDGEN_CPP_TEST_CPP_H_
6 #define BUILD_RUST_TESTS_BINDGEN_CPP_TEST_CPP_H_
7 
8 // We use some C++20 stuff to ensure the correct mode is being used.
9 template <class T>
10 concept AlwaysTrue = true;
11 
12 namespace functions {
13 
14 inline constexpr int kNumber = 2;
15 
template_fn(AlwaysTrue auto i)16 int template_fn(AlwaysTrue auto i) {
17   return i;
18 }
19 
20 int normal_fn(int i);
21 
22 }  // namespace functions
23 
24 #endif  // BUILD_RUST_TESTS_BINDGEN_CPP_TEST_CPP_H_
25