C++

1777 readers
1 users here now

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

Rules

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

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.

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

This talk assumes no prior knowledge of functional programming.

90
 
 

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

91
 
 

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

92
93
6
submitted 9 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.

94
 
 

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

95
 
 

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.

96
 
 

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.

97
6
submitted 10 months ago* (last edited 10 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!

98
 
 

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

99
 
 

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

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