C++

1755 readers
2 users here now

The center for all discussion and news regarding C++.

Rules

founded 1 year ago
MODERATORS
76
77
7
submitted 7 months ago by lysdexic to c/cpp
78
6
submitted 7 months ago by lysdexic to c/cpp
79
80
 
 

The last in a series of blog posts on a C++ technique that I've put to use for a numerical library. Was a fun little exercise, sharing here.

81
7
Atomics And Concurrency (redixhumayun.github.io)
submitted 7 months ago by lysdexic to c/cpp
82
83
12
submitted 7 months ago by lysdexic to c/cpp
84
85
4
submitted 8 months ago by lysdexic to c/cpp
86
18
submitted 8 months ago by lysdexic to c/cpp
87
88
 
 

This talk assumes no prior knowledge of functional programming.

89
 
 

I did a code that uses custom literals to allow indexing arrays with ordinals (1st, 2nd, 3rd), all at compile time. Additionally _st works only with 1, _nd only with 2, _rd only with 3. Zero and negative numbers are also not supported and fail compilation.

https://github.com/serpent7776/bits/blob/master/th.cpp/th.cpp

90
 
 

The spaceship operator took me longer than it should (my mistake). A note to my future self, and maybe of use to you.

91
92
6
submitted 8 months ago by [email protected] to c/cpp
 
 

From last year's CppCon, posted just 4 hours ago. A nice discussion about CTAD, how it works, deduction guides and some pitfalls.

93
 
 

Another great "back to basics", by the great O'Dwyer. Definitely a must-watch for those still struggling with C++ smart pointers.

94
 
 

The intersection of forwarding references and overload resolution has been bugging me, and I've been caught out a few times on the wrong overload, so here's an idea.

95
 
 

Best resource I've seen out there for template basics. It even briefly mentions variadic templates, concepts that are easy to understand, auto in function parameters (a.k.a. abbreviated function templates) and how to find out what type is chosen when you do class template automatic deduction (CTAD).

I feel like this is an absolute must-watch if you want to know about modern template practices.

96
7
submitted 9 months ago* (last edited 9 months ago) by [email protected] to c/cpp
 
 

C++03 does feel ancient now, but the sizeof trick to simulate what you could do today with std::void_t and decltype (or simply concepts since C++20) definitely blew me away!

97
 
 

The talk goes over compile-time parsing using Boost.MetaParse, Lexy, CTRE, CTPG and Macro Rules, and how it fits in with reflection.

98
 
 

I quite liked this talk. Especially where Vincent talks about aggregate initialization, invariants and avoiding invalid values.

99
7
submitted 9 months ago by lysdexic to c/cpp
100
view more: ‹ prev next ›