Questions tagged [c++23]
Code that is written to the 2023 version of the C++ standard. Use in conjunction with the 'c++' tag.
28
questions
2
votes
1
answer
73
views
draw_if_possible Template Function Implementation for Image in C++
This is a follow-up question for Midpoint Circle Algorithm Implementation for Image in C++, draw_circle Template Function Implementation for Image in C++, SIFT Keypoint Detection for Image in C++, ...
2
votes
2
answers
98
views
Midpoint Circle Algorithm Implementation for Image in C++
This is a follow-up question for draw_circle Template Function Implementation for Image in C++, SIFT Keypoint Detection for Image in C++, difference_of_gaussian Template Function Implementation for ...
6
votes
1
answer
151
views
draw_circle Template Function Implementation for Image in C++
This is a follow-up question for SIFT Keypoint Detection for Image in C++, difference_of_gaussian Template Function Implementation for Image in C++, conv2 Template Function Implementation for Image in ...
3
votes
0
answers
100
views
SIFT Keypoint Detection for Image in C++
This is a follow-up question for difference_of_gaussian Template Function Implementation for Image in C++, conv2 Template Function Implementation for Image in C++ and imgaussfilt Template Function ...
4
votes
2
answers
376
views
convn Template Function Implementation for Image in C++
This is a follow-up question for conv2 Template Function Implementation for Image in C++ and conv3 Template Function Implementation for Image in C++. I am trying to perform n-dimensional convolution <...
1
vote
1
answer
44
views
conv3 Template Function Implementation for Image in C++
This is a follow-up question for conv2 Template Function Implementation for Image in C++. Besides two-dimensional convolution, I am trying to implement three-dimensional convolution for 3D image in C++...
2
votes
0
answers
40
views
Gradient in C++/SFML
As an exercise, I've decided to try my hand at gradients using SFML. To truly make this a learning experience, I didn't look at any resources or papers that described an algorithm for doing so; I ...
5
votes
1
answer
79
views
Fast and low Memory Requiring Lookup Tree Library
Background
While working on solving the end game of the russian card game Durak I developed a library small_memory_tree to store the simulation results. You can try the game on my website Modern Durak ...
1
vote
0
answers
47
views
Two Dimensional Discrete Fourier Transform Template Function Implementation for Image in C++
This is a follow-up question for An Updated Multi-dimensional Image Data Structure with Variadic Template Functions in C++. For learning purpose, I am trying to implement two dimensional discrete ...
8
votes
3
answers
457
views
conv2 Template Function Implementation for Image in C++
This is a follow-up question for An Updated Multi-dimensional Image Data Structure with Variadic Template Functions in C++. I am trying to implement conv2 template ...
5
votes
2
answers
957
views
An Implementation of UNIX wc shell utility
The implementation doesn't support the "-m" flag, and only works with ASCII, and has rather terrible output formatting in comparison with GNU's implementation of wc.
Code:
...
3
votes
1
answer
56
views
Advanced String Calculator with asin, acos, atan Functions in C++
This is a follow-up question for Advanced String Calculator in C++. Considering the suggestions mentioned in MrBean Bremen's answer, I am trying to update the implementation as below.
The experimental ...
3
votes
1
answer
52
views
A recursive_flatten_view Template Function Implementation in C++
This is a follow-up question for A recursive_flatten Template Function Implementation in C++. I am trying to follow G. Sliepen's answer to create ...
2
votes
1
answer
67
views
A recursive_flatten Template Function Implementation in C++
This is a follow-up question for A Summation Function For Boost.MultiArray in C++, A recursive_minmax Template Function Implementation in C++ and A recursive_reduce_all Template Function ...
3
votes
1
answer
151
views
initializing a timezone database and getting all timezone names (before main())
I have written the below small program that tries to initialize a tzdb before the main() runs. So once the main function runs, it checks the two global variables (...
5
votes
2
answers
555
views
Function templates for serializing/deserializing POD types
Are the two function templates below well-formed for serializing/deserializing POD types? Will they work for all the different types that satisfy the constraint pod?...
2
votes
1
answer
60
views
recursive_find and recursive_find_if_not Template Functions Implementation in C++
This is a follow-up question for A recursive_find_if Template Function with Unwrap Level Implementation in C++ and recursive_invocable and recursive_project_invocable Concept Implementation in C++. I ...
6
votes
2
answers
359
views
A simple find function with concepts
I have written the following simple find function template that does a linear search.
...
5
votes
1
answer
122
views
Locate and multiply numbers in a 2D grid (Advent of Code 2023 Day 3, Part 2)
I am using the Advent of Code 2023 to study functional programming and the ranges library in C++. This code is for the second part of Day 3 and is the best solution using FB I've created. I'd ...
7
votes
1
answer
253
views
Differential Evolution
I have a PR implementing differential evolution. I'm a bit concerned about the implementation and would like some feedback:
The class could be a free function. However, there are so many parameters, ...
7
votes
4
answers
1k
views
Matrix Class Implementation
I have written a minimal matrix class. I would like to utilize the latest C++ features, follow best practices, and utilize multi-threading in some of the operations. I have also setup a GoogleTest ...
2
votes
0
answers
47
views
A recursive_fold_right_all Template Function Implementation in C++
This is a follow-up question for A recursive_fold_left_all Template Function Implementation in C++. Besides recursive_fold_left_all function, I am trying to ...
2
votes
1
answer
68
views
A recursive_fold_left_all Template Function Implementation in C++
This is a follow-up question for A recursive_sum Template Function Implementation with Unwrap Level in C++. I am trying to implement a recursive version fold_left ...
2
votes
1
answer
101
views
sendmsg() scatter-gather coroutine awaiter, optimized suspending
My attempt at an Awaiter for sending scatter-gather data over an open file descriptor. Tested only on gcc-13.1.1
Micro-optimizing by suspending the coroutine only ...
5
votes
1
answer
210
views
Is there a more idiomatic way than this to use template-generic C++23 multidimensional array subscripts?
C++23 is going to add multidimensional array subscript operators to the language, yippee!
Alas, I have not yet come across a way to adapt them to types where the number of dimensions is templated, so ...
5
votes
1
answer
254
views
string_view tokenizer function template
Below is a function template that tokenizes a given std::basic_string_view using a given delimiter and assigns the tokens to a buffer (via a ...
3
votes
1
answer
81
views
scoped timer class (3rd revision)
Again, here is the previous question. I have (re)revised my custom scoped timer using the valuable feedback I got from a helpful member of this community. However I feel the need to ask this question ...
3
votes
1
answer
168
views
Row-sparse constexpr 2D array, generated at compile-time from array coordinate/value entries
The goal of the code is to enable me to express a 2D array in an unsorted coordinate-sparse representation in my code (i.e. a list of individual x, y, value entries ...