]> git.proxmox.com Git - ceph.git/blame - ceph/src/seastar/cmake/code_tests/Source_location_test.cc
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / seastar / cmake / code_tests / Source_location_test.cc
CommitLineData
1e59de90
TL
1#if __has_include(<source_location>)
2#include <source_location>
3#endif
4
5#ifdef __cpp_lib_source_location
6using source_location = std::source_location;
7#elif __has_include(<experimental/source_location>)
8#include <experimental/source_location>
9using source_location = std::experimental::source_location;
10#endif
11
12#if defined(__cpp_lib_source_location) || defined(__cpp_lib_experimental_source_location)
13struct format_info {
14 format_info(source_location loc = source_location::current()) noexcept
15 : loc(loc)
16 { }
17 source_location loc;
18};
19#else
20struct format_info { };
21#endif
22
23int main()
24{
25 format_info fi;
26}