xref: /aosp_15_r20/external/libcxx/test/libcxx/libcpp_version.pass.cpp (revision 58b9f456b02922dfdb1fad8a988d5fd8765ecb80)
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10 
11 // Test that the __libcpp_version file matches the value of _LIBCPP_VERSION
12 
13 #include <__config>
14 
15 #ifndef _LIBCPP_VERSION
16 #error _LIBCPP_VERSION must be defined
17 #endif
18 
19 static const int libcpp_version =
20 #include <__libcpp_version>
21 ;
22 
23 static_assert(_LIBCPP_VERSION == libcpp_version,
24               "_LIBCPP_VERSION doesn't match __libcpp_version");
25 
main()26 int main() {
27 
28 }
29