New answers tagged c++20
2
votes
A recursive_minmax Template Function Implementation in C++
Bug
You iterate the range twice, once for each partial result, which is forbidden for a simple std::ranges::input_range.
You need at least a ...
1
vote
Accepted
A recursive_minmax Template Function Implementation in C++
Separate concerns
You are not following the principle of separation of concerns. Whenever you write a recursive_foo() function, you should separate the concern of ...
2
votes
C++ implementation of a concurrent queue and of a thread pool
Remove empty()
The result of empty() is a lie. Consider that between returning the result and the caller looking at it, some ...
5
votes
C++ heap allocator using an explicit free list
Overview
Must say that when reading complex code, the first thing I want to read is the constructor and destructor. Personally I always put these first in a source file. Without understanding these ...
Top 50 recent answers are included
Related Tags
c++20 × 287c++ × 278
recursion × 61
template × 44
constrained-templates × 25
reinventing-the-wheel × 19
lambda × 19
performance × 17
template-meta-programming × 17
multithreading × 16
algorithm × 15
boost × 14
beginner × 11
matrix × 9
concurrency × 9
array × 7
c++17 × 7
callback × 6
constant-expression × 6
strings × 5
image × 5
error-handling × 5
thread-safety × 5
design-patterns × 4
sorting × 4