shaneasd

Results 42 comments of shaneasd

No you've convinced me with this: > No it isn't, because we just dicussed to instances where this is not happening (in a qualified function call and inside of constructor/destructor)...

presumably so you can override on other contiguous byte containers like std::array? reinterpret_as doesn't make it clear to me whether the object is guaranteed to exist in terms of the...

One answer to "why would you make it a member?" that I find almost universally applicable (universally in the sense that it applies to all methods not all users) is...

Link for convenience: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#i10-use-exceptions-to-signal-a-failure-to-perform-a-required-task And Status/StatusOr documentation: https://abseil.io/docs/cpp/guides/status

I interpret "almost always wrong" as an indication that something is commonly misused rather than not often useful. You might assert that std::priority_queue is almost always wrong in that considering...

I don't think it is covered as you describe. Which bit specifically? For convenience here is that excerpt > Exceptions: When any of the special functions are declared only to...

My reading of that is that it is specifically saying that reference members way require you to customize the copy constructor and assignment without needing to modify the destructor.

I think this was mentioned in and is addressed by #1610

is ```span_p(a, [](int n){ return n!= 0; })``` prettier than ```take_while(a, [](int n){ return n != 0; })``` or am I misunderstanding the syntax? Does http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#p13-use-support-libraries-as-appropriate apply here? I would...

I notice that in your example you've defaulted the default constructor and in C.21 it is explicitly noted ```Declaring any special member function except a default constructor, even as =default...