compiler bugs, will they ever stop harassing me?
aka another reason to never use built-in arithmetic types.
@namark Are you sure it is a compiler bug? I am not sure whenever it actually is one or not tbf
@Archivist are you a gcc alt? stop gaslighting meeee >.<
otherwise, please elaborate, good sir, what is your objection? o.O
@namark nah, I am just accustomed at how confusing the standard is
@Archivist don't make me read the standard, I'll defect report :<
The basis for my questioning here is that primitive operators in C++ are not functions, so whenever they warrant implicit conversions or not with a behaviour similar to an actual function is questionable
I will actually investigate that a bit and tell you my findings
I confirm that this is a bug of GCC linked to templates. You can circumvent that bug using concepts in a portable fashions (see here: https://godbolt.org/z/PzT9eeTj4)
@Archivist concepts are nice... the ranges and modules baggage though... also not going to use a standard that's barely not even done implemented yet so far.
The real workaround is
template<typename T, size_t D>
int operator+(int, One<T,D>);
and so on, and if that's all you needed maybe making the conversion explicit, not that gcc respects explicit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55101
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87605
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87820
well, that is quite a work around the wrong thing (and it doesn't actually work in all circumstances) which is why it would definitely favour the concept approach (which also allows me to not use enable_if ever again)
I try to always work with the latest validated version of C++, though I understand your reasons for not liking the incomplete module system (I don't quite get the point of view on ranges though, those are quite nice)
@Archivist
> working with the latest version
gotta love not compiling your code then
> ranges
library is experimental and not fully baked by the admission of the author, has several major issues at the design and technical level. I was under the impression that only time proven common practises can get into the standards, but apparently if you are friends with the higher-ups anything goes.
@Archivist
> I use features when
so basically you ar working with some unspecified intermediate standard
> get fully supported by clang
and you like lagging behind