

0.4889 / 7 chance of failure, naively accounting for Windows’ market share and assuming the user is sufficiently privileged (according to LostXOR’s comment, I stand corrected)
0.4889 / 7 chance of failure, naively accounting for Windows’ market share and assuming the user is sufficiently privileged (according to LostXOR’s comment, I stand corrected)
Tbh, despite the horrible UX I wouldn’t even be mad if I saw the month dialog in the wild
In fact, depending on my mood, someone may have to figure out which month Deculyuary is.
Only to get 1 downvote and no follow-up
That’s only for C++, as far as I can tell that struct is valid C
Relatable tbh
Concepts are already here - (as of now) they fix a subset of this, and errors messages can still be extremely long.
They’re less like “here’s every single template parameter of the involved types” and more like “this template thingy has many specializations with different constraints, here’s a list of all of them and why none of them are satisfied with your parameters”
Not evil by itself, but if you want to obfuscate C++20 code you can get REALLY creative…
C++, lawful good
Who wouldn’t pity those who make do with a lossy compression image format?
Lua - Portuguese feminine noun for “moon”, coming from the Latin “luna”
Luna - Latin, feminine noun (coincidentally identical to the Italian noun, also feminine)
Yup, Lua is a girl.
VS Codium did that at some point, it probably still does but I haven’t checked
Just tested this: the “original+” code compiles, but does not increment i.
There were two problems:
b(bool)
and b(char)
are ambiguous (quick fix: change the signatures to char b(bool&)
and auto b(char&& v)
);b
functions, even if the constraint is only checked after both, I was unaware of this (fix: define C
immediately before void inc(int&)
).It’s funny that it complains about all of the right stuff (except the ‘int’ thing), but it doesn’t say anything about the concept.
About the ‘int’ literal (which is not a string): cppreference.com has a description on this page about it, ctrl+f “multicharacter literal”.
Just surround your eyes with try {
… } catch(Up& up) { }
, easy fix
Multiple-character char literals evaluate as int, with implementation defined values - it is extremely unreliable, but that particular piece of code should work.
// C++20
#include <concepts>
#include <cstdint>
template <typename T>
concept C = requires (T t) { { b(t) } -> std::same_as<int>; };
char b(bool v) { return char(uintmax_t(v) % 5); }
#define Int jnt=i
auto b(char v) { return 'int'; }
// this increments i:
void inc(int& i) {
auto Int == 1;
using c = decltype(b(jnt));
// edited mistake here: c is a type, not a value
// i += decltype(jnt)(C<decltype(b(c))>);
i += decltype(jnt)(C<decltype(b(c(1)))>);
}
I’m not quite sure it compiles, I wrote this on my phone and with the sheer amount of landmines here making a mistake is almost inevitable.
No, all files are base 256
Isn’t auto
a keyword in C?
Javascript took the wrong turn and ended up in [object Object]