File: Source_location_test.cc

package info (click to toggle)
seastar 25.05.0-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 7,256 kB
  • sloc: cpp: 89,250; python: 5,066; ansic: 3,452; sh: 1,272; xml: 177; makefile: 9
file content (26 lines) | stat: -rw-r--r-- 625 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#if __has_include(<source_location>)
#include <source_location>
#endif

#ifdef __cpp_lib_source_location
using source_location = std::source_location;
#elif __has_include(<experimental/source_location>)
#include <experimental/source_location>
using source_location = std::experimental::source_location;
#endif

#if defined(__cpp_lib_source_location) || defined(__cpp_lib_experimental_source_location)
struct format_info {
    format_info(source_location loc = source_location::current()) noexcept
        : loc(loc)
    { }
    source_location loc;
};
#else
struct format_info { };
#endif

int main()
{
    format_info fi;
}