Solutions? Where we're going, we don't need solutions.
Solutions? Where we're going, we don't need solutions.
Please dont take this seriously guys its just a dumb meme I haven't written a single line of code in half of these languages
You're viewing a single thread.
View all comments
204
comments
C:
Problem
→return Solution;
C++:
Problem
→const [auto]&& (Problem&& problem) noexcept(noexcept( Solution<Problem>{}(std::forward<Problem>(problem)) )) { return Solution<Problem>{}(std::forward<Problem>(problem)); } -> decltype( Solution<Problem>{}(std::forward<Problem>(problem)) )
26 1 ReplyC:
return *(solution_t*)&problem;
12 0 ReplyMaximum optimization!
5 0 Reply
But this doesn't return the
Solution
. You don't invoke the lambda.(Or does C++ have implied returns now? Last I heard there was implied
move
)5 0 ReplyActually I do; it's the
{}
that initializes the lambda, and the parenthesis after invokes.That said, it would have been fun.
2 0 Reply
You've viewed 204 comments.
Scroll to top