Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [c++20]

Code that is written to the 2020 version of the C++ standard. Use in conjunction with the 'c++' tag.

25 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
72 views

Image Rotation with Shear Transformation in C++

This is a follow-up question for Image Rotation and Transpose Functions Implementation in C++ and An Updated Multi-dimensional Image Data Structure with Variadic Template Functions in C++. I am trying ...
JimmyHu's user avatar
  • 4,958
3 votes
0 answers
57 views

invocable_traits v3

Update: there is a new version of this code: v4 is posted here Goal: implement traits that for anything callable return its arity, return type and the argument types. Since pointers to data members ...
Diederick C. Niehorster's user avatar
3 votes
0 answers
230 views

Implementation of Dynamic Array with allocators and C++20

To train my skills in C++, I decided to implement the well-known "Dynamic array" data structure on my own. I realized early on that using pointers or smart pointers is wrong, as it leads to ...
PavelDev's user avatar
  • 131
3 votes
0 answers
270 views

A Compile-time templated event system and dispatch manager

Problem I would like to make an efficient, extensible, and potentially asynchronous parallelizable event system using modern features in C++20. My solution I've constructed a templated event struct by ...
Robbie's user avatar
  • 131
3 votes
0 answers
66 views

A recursive_count_if Function with Specified value_type for Various Type Arbitrary Nested Iterable Implementation in C++

This is a follow-up question for A recursive_count_if Function For Various Type Arbitrary Nested Iterable Implementation in C++. Thanks to Quuxplusone's answer and G. Sliepen's comments. Based on the ...
JimmyHu's user avatar
  • 4,958
3 votes
0 answers
159 views

An element_wise_multiplication and an element_wise_division Function For Boost.MultiArray in C++

This is a follow-up question for An element_wise_add Function For Boost.MultiArray in C++ and An Add/Minus Operator For Boost.MultiArray in C++. Besides the basic element-wise add / minus operations, ...
JimmyHu's user avatar
  • 4,958
3 votes
0 answers
148 views

A recursive_print Function For Various Type Arbitrary Nested Iterable Implementation in C++

This is a follow-up question for A recursive_transform for std::vector with various return type and A recursive_transform for std::array with various return type. Based on these discussion about the ...
JimmyHu's user avatar
  • 4,958
3 votes
0 answers
102 views

Experimenting with C++20 coroutines to create Python-style generator functions

I've been playing around with the coroutines implementation in gcc 10.2.0 (Debian build) based on the sparse documentation at https://en.cppreference.com/w/cpp/language/coroutines . The target, for ...
Daniel Schepler's user avatar
2 votes
0 answers
53 views

A recursive_depth Function Implementation with Target Type Parameter in C++

This is a follow-up question for A recursive_depth function for calculating depth of nested types implementation in C++. I am rethinking about the proposed ...
JimmyHu's user avatar
  • 4,958
2 votes
0 answers
168 views

invocable_traits v5

Goal: implement traits that for anything callable return its arity, return type and the argument types. Since pointers to data members are also callable, those should be handled (and be considered 0-...
Diederick C. Niehorster's user avatar
2 votes
0 answers
223 views

2d Grid - Iterating by Rows / Cells - Take #3

Edited with a bit more unit tests. Preface Following my second version: 2d Grid - Iterating by Rows / Cells - Take #2 I believe that I am now satisfied with this new version below. There is still one ...
Shigoto Shoujin's user avatar
2 votes
0 answers
53 views

SQL (ODBC) bind to C++ classes row-wise (follow-up)

This is follow-up on SQL (ODBC) bind to C++ classes row-wise The main idea behind this code is to minimize the number of ODBC API calls, because profiling shows significant amount of time is spent in ...
OwnageIsMagic's user avatar
2 votes
0 answers
52 views

C++20 Ndim matrix, computing eigenvalues and eigenvectors

My C++20 N-dimensional matrix project now supports basic linear algebra operations: https://github.com/frozenca/Ndim-Matrix Today I want to get some reviews on computing eigenvalues and eigenvectors. ...
frozenca's user avatar
  • 1,703
1 vote
0 answers
35 views

recursive_remove_copy_if and recursive_remove_copy Template Functions Implementation with Execution Policy in C++

This is a follow-up question for recursive_remove and recursive_remove_if Template Function with Unwrap Level Implementation in C++. I am trying to implement ...
JimmyHu's user avatar
  • 4,958
1 vote
0 answers
45 views

An Updated recursive_transform_reduce Template Function with Unwrap Level Implementation in C++

This is a follow-up question for A recursive_transform_reduce Template Function with Unwrap Level Implementation in C++. To fix the issue mentioned in G. Sliepen's answer, I updated the test cases and ...
JimmyHu's user avatar
  • 4,958
1 vote
0 answers
58 views

Stand/Bench for testing emergency situations for 2p2 networks in games

In fact, this is a throttling proxy. It can work in two modes: "paired" and "multi-Client". In "pair" mode, two clients connect to each other through a proxy, very ...
Alexovsky's user avatar
1 vote
0 answers
66 views

C++ registry class which manages game object, components and systems in an ECS

So this is my header file (registry.hpp): ...
Aspect11's user avatar
  • 145
1 vote
0 answers
85 views

An Updated recursive_transform Template Function Implementation in C++

This is a follow-up question for A recursive_transform_view Template Function Implementation and A recursive_transform_view Template Function which returns a view in C++. In those implementations ...
JimmyHu's user avatar
  • 4,958
1 vote
0 answers
70 views

A recursive_reduce Template Function with Unwrap Level Implementation in C++

This is a follow-up question for A recursive_sum Template Function Implementation with Unwrap Level in C++ and A recursive_reduce_all Template Function ...
JimmyHu's user avatar
  • 4,958
1 vote
0 answers
81 views

A recursive_unwrap_type_t Struct Implementation in C++

This is a follow-up question for A recursive_sum Template Function Implementation with Unwrap Level in C++. As G. Sliepen's answer mentioned, I am trying to implement a recursive struct for retrieve ...
JimmyHu's user avatar
  • 4,958
1 vote
0 answers
69 views

A batch_recursive_count_if Function with Unwrap Level for Various Type Arbitrary Nested Iterable Implementation in C++

This is a follow-up question for A recursive_count_if Function For Various Type Arbitrary Nested Iterable Implementation in C++ and A recursive_count_if Function with Unwrap Level for Various Type ...
JimmyHu's user avatar
  • 4,958
1 vote
0 answers
206 views

"tuple with named fields" implementation

I'd like to show you a type I made while experimenting with literal, non-type template parameters in C++20. The idea is to provide a type that wraps up tuple-like types (std::tuple, std::pair, even ...
Fabio A.'s user avatar
  • 261
1 vote
0 answers
76 views

A recursive_replace_copy_if Template Function Implementation in C++

This is a follow-up question for A recursive_copy_if Template Function Implementation in C++. Besides the recursive version std::ranges::copy_if, I am trying to ...
JimmyHu's user avatar
  • 4,958
1 vote
0 answers
58 views

A non-nested test_vectors_generator Function for arithmetic_mean Function Testing in C++

This is a follow-up question for An arithmetic_mean Function For Various Type Arbitrary Nested Iterable Implementation in C++. As Toby Speight's answer mentioned, some self-checking unit tests are ...
JimmyHu's user avatar
  • 4,958
1 vote
0 answers
61 views

std::deque and std::list Type Arbitrary Nested Iterable Generator Functions Implementation in C++

This is a follow-up question for std::array and std::vector Type Arbitrary Nested Iterable Generator Functions Implementation in C++ and the previous questions about recursive functions, including A ...
JimmyHu's user avatar
  • 4,958