19inline constexpr std::array<std::string_view, 22>
ablations{
52inline bool ablated(std::string_view name)
noexcept {
53 static auto const list = [] {
54 char const*
const value = std::getenv(
"CUDDL_ABLATE");
55 std::string_view
const text = value ==
nullptr ? std::string_view{} : value;
56 for (
size_t start = 0; start < text.size();) {
57 auto end = text.find(
',', start);
58 if (end == std::string_view::npos) end = text.size();
59 auto const item = text.substr(start, end - start);
62 stderr,
"CUDDL_ABLATE: unknown ablation '%.*s'\n",
int(item.size()), item.data()
70 for (
size_t start = 0; start < list.size();) {
71 auto end = list.find(
',', start);
72 if (end == std::string_view::npos) end = list.size();
73 if (list.substr(start, end - start) == name)
return true;
82constexpr bool ablated(std::string_view)
noexcept {
constexpr std::array< std::string_view, 22 > ablations
Optimisations that the CUDDL_ABLATE environment variable can turn off in a build configured with -Dab...
constexpr bool ablations_enabled
constexpr bool ablated(std::string_view) noexcept
Always false: this build compiles the ablation switches out.