1,352 karma · joined Feb 7, 2014 (12y ago) · 622 submissions
comment 2y ago · link · parent
Change: Previously valid identifiers containing characters not present in UAX #44 properties XID_Start or XID_Continue, or not in Normalization Form C, are now rejected.
Rationale: Prevent confusing characters in identifiers. Requiring normalization of names ensures consistent linker behavior.
Effect on original feature: Some identifiers are no longer well-formed.comment 2y ago · link · parent
gcc 14 has not yet been released; going by past years, 14.1 should come out around the start of May (2024). clang 17 was released September (2023); note that you need to use libc++ (stlib=libc++), not libstdc++. VS 2022 17.7 has been out since August.
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
The reason it would be impossible for the US to default is that the US is not significantly in debt. Most of the federal debt is held domestically, meaning by the US. You can't be in debt to yourself.
comment 3y ago · link · parent
A small modification of the second figure can show that for any non-equilateral triangle, n^2 + 1 such triangles will cover a similar triangle of length ration 1 : n + ε; it remains (as of 2010, at least; see [1]) an open problem whether a construction of n^2 + 1 triangles exists in the equilateral case.
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
It's also incredibly easy; SLC could outbid the farmers hundreds of times over and it wouldn't be even a rounding error in the city budget. It's difficult to see anyone opposing this as anything other than useful idiots for the ag lobby.
comment 3y ago · link · parent
comment 3y ago · link · parent
template<class E> requires std::is_enum_v<E> constexpr std::string_view joinedEnum() {
constexpr auto generate = [] -> std::string {
return []<template<class...> class L, class... D>(L<D...>) {
std::string str;
(((str += (str.empty() ? "" : ", ")) += D::name), ...);
return str;
}(boost::describe::describe_enumerators<E>());
};
static constexpr auto arr = [&] {
constexpr std::size_t N = generate().size();
std::array<char, N> arr;
std::char_traits<char>::copy(arr.data(), generate().data(), N);
return arr;
}();
return std::string_view(arr);
}
Note that you have to generate the constexpr std::string twice; once for its size, once for its contents. But you assume that the compiler can memoize the result.