C++

374 posts

C++ banner
C++

C++

@c_plus_plus

Twitter link for the official C++ Facebook page

World Sumali Eylül 2009
120 Sinusundan16.6K Mga Tagasunod
C++ nag-retweet
Richard Smith
Richard Smith@zygoloid·
Quick C++ quiz: what does this do? #include <stdio.h> void f(float&&) { puts("float"); } void f(int&&) { puts("int"); } void g(auto &&...v) { (f(v), ...); } int main() { g(1.0f, 2); }
English
21
27
128
0
C++
C++@c_plus_plus·
@journeymanped well, the alternative in the scenarios where it is usually used is to have a full-blown cast. Would you rather your users write an ugly cast in front of a lambda or just explain them the + trick?
English
2
1
2
0
Barry Vice
Barry Vice@journeymanped·
@c_plus_plus liked but with the proviso that I think it's a very bad idea to have this be a thing that is intentional for the user to do.
English
1
0
1
0
C++
C++@c_plus_plus·
New Year Quiz: how many of you C++ buffs know about and used a + in front of a captureless lambda to trigger conversion to function pointer? Like the post if you did! Curious how popular this trick is for surface syntax design of a library...
English
16
7
73
0
C++
C++@c_plus_plus·
This is arguably the most innovative and interesting talk from CppCon'18. LL(1) parsing at compile time as part of building regex state machines at compile time youtube.com/watch?v=QM3W36… C++ has come a long way from C and Simula. youtube.com/watch?v=QM3W36…
YouTube video
YouTube
English
0
18
43
0