blob: 9880752d6698cbe108846a3cdea227a4f93c8a41 (
plain)
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
27
|
#pragma once
// As of clang-12, clang still doesn't support std::source_location, which
// means that clang-tidy also doesn't support std::source_location.
// Inside the libstdc++ implementation of <source_location> is this check of
// __builtin_source_location to determine if the compiler supports the
// necessary bits for std::source_location, and if not the header ends up doing
// nothing. Use this same builtin-check to detect when we're running under
// an "older" clang and fallback to std::experimental::source_location instead.
#if __has_builtin(__builtin_source_location)
#include <source_location>
namespace bmcweb
{
using source_location = std::source_location;
}
#else
#include <experimental/source_location>
namespace bmcweb
{
using source_location = std::experimental::source_location;
}
#endif
|