« first day (3946 days earlier)      last day (985 days later) » 

12:53 AM
 
 
10 hours later…
nwp
10:53 AM
@nwp I found the bug. Someone inherited from QGuiApplication and did MyQGuiApplication::MyQGuiApplication(int argc, char *argv[]) : QGuiApplication(argc, argv) {} instead of MyQGuiApplication::MyQGuiApplication(int &argc, char *argv[]) : QGuiApplication(argc, argv) {}. Technically Qt's documentation does warn about that, but it still seems like a very obscure bug and I'm disappointed in the debug tools being so unhelpful.
 
Oo, nwp is talking to himself again ~_~
 
nwp
It's not like I have many alternatives here.
 
wtf
 
nwp
11:56 AM
I could have sworn there was a way to make returning mutexes compile due to required NRVO, but apparently that is not a thing.
 
As of C++20 you've only got guaranteed RVO
prvalues and all that jazz
 
I thought guaranteed copy elision would do it too
 
There are plans to standardize some subset of NRVO in the future, but right now it's only for prvalues
 
but I guess if it's non-copyable and non-movable that doesn't exist
 
Guaranteed prvalue copy elision works even without a copy or move constructor/operator
 
nwp
12:04 PM
We only have required RVO, not NRVO, unfortunately.
 
Sonn
 
and yet the example provided fails
 
yes because it's NRVO and not RVO
Guaranteed NRVO is only for the future
return std::mutex{} work perfectly fine today
 
 
3 hours later…
3:16 PM
I'm starting to hate C++ disallowing `static constexpr` locals in `constexr` functions.
Would it make more sense to just allow that, or make `constexpr` imply static lifetime?
There are work-arounds for that, as for the blanket prohibition of `goto`, but that's cumbersome.
 
why would you need it? you're already constexpr
or do you want consteval?
 
@Deduplicator yo can just drop the static and everything works fine though
If the variable can't change through the duration of the program and is know at compile-time, then there's hardly a difference between static or not, it's just a compile-time constant
 
If I drop the `static`, the compiler will always copy the table into a new stack variable.
If I drop the `constexpr` on the function, I cannot use it in a constant context.
The only working workaround is taking it all out of the function and reassembling it piecemeal in namespace-scope.
copying 16+ words needlessly means the function is far slower and bigger. Also, returning pointers and references into it if I wanted would have obvious problems.
 
does sound like much more of a problem
Time to write a proposal to allow it, with motivation, use cases, current workarounds and why it would be better to have the thing proper
 
@Mgetz I want constexpr: Fast code which can be called at runtime, but callable at compiletime too.
 
 
2 hours later…
5:30 PM
Anybody up to anything cool?
 
 
1 hour later…
6:35 PM
screwing around with fold expressions to get rid of a co_await in a loop
and then having it fail
 
6:52 PM
and got it to work
completely pointless and bloats the application but why not!
 
 
4 hours later…
11:01 PM
Ya'll think C++ exception handling could be improved if we had a mandatory exception system like Java (maybe opt into mandatory exception catching...)
 

« first day (3946 days earlier)      last day (985 days later) »