@tripu I suggest you lay off the judge dread mindset, otherwise you wouldn't be able to make sense of any law, not that you'll ever study it.
libstdc++ manual: These debugging containers are functionally equivalent to the standard drop-in containers used in debug mode [1]
me: but why isn't std::string detecting iterator invalidation, like __gnu_debug::string, what am I doing wrong :/
libstdc++ manual: *goes on a huge rant about how awesome libstdc++ is* ... The end result is that we have achieved per-use recompilation but have had to give up some checking of the std::basic_string class template (namely, safe iterators). [2]
me: why thanks for being so honest and upfront about that, I totally didn't waste all day looking into this thanks to you -_-
1. https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_using.html#debug_mode.using.specific
2. https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_design.html#debug_mode.design.methods.coexistence
my brain on c++:
spends hours on an elaborate meta programming to implement private friend functions with perfect forwarding, only to realize that it's solving the wrong problem and all it actually needed was a const member function...
@ercadio I was talking about my real world day to day struggles here, plenty of fixed point number implementation used all over the place (sometimes not even called fixed point or a number at all) that can be generalized as rationals with fixed denominator, except that most real world implementations of rationals can't do it cause they are too eager to reduce the fraction, since from pure algebra perspective that's desirable.
I've never seen either of the things you mentioned implemented or used in any way. I guess maybe when doing geometry for games you avoid square root by dealing with squares of lengths as much as possible, would be nice to have a type for that to prevent invalid algebra, but as a radical that's an analogy of a fixed denominator rational, so if your pure algebra implementation is again eager to reduce in one way or the other, it probably won't cut it. With cubic roots and above I'd assume you are deep into pure math/science already and don't care about the details.
@soundwave natural selection is eugenics, you cracked it einstein
this is why your math-scientific always canonical pure algebra implementation doesn't cut it, rationals have much wider scope - to keep track of and delay division until it's convenient/necessary
a fixed point number is just an optimization of a rational with fixed denominator
wasted hours patching it up before learning to read and finding it alive and kicking on github, no more auto_ptr, still a mess in general, but doesn't segfault quite as often as the ancient release
@Archivist yeah, operators are generally cumbersome, but I already have some heavy machinery set up to deal with them... it's macros ok? the language left me no choice!
@Archivist also where is it that the user defined operators don't work, tell me so I fix my code please
@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
@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 *cough* I mean
template<typename T>
T operator+(T, One<T,1>);
and so on
@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
@iron_bug this is like c++98 level code in terms of language features involved... and don't you come at me with C I'll shred you :V
@Archivist don't make me read the standard, I'll defect report :<
@ercadio I'm gonna pretend you didn't say msvc, but wanna see clang crash and burn? I'm gonna show you anyway:
http://ix.io/2nlF/cpp
@Archivist are you a gcc alt? stop gaslighting meeee >.<
otherwise, please elaborate, good sir, what is your objection? o.O