Skip to main content

Questions tagged [c++23]

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

Filter by
Sorted by
Tagged with
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++, ...
JimmyHu's user avatar
  • 5,572
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 ...
JimmyHu's user avatar
  • 5,572
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 ...
JimmyHu's user avatar
  • 5,572
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 ...
JimmyHu's user avatar
  • 5,572
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 <...
JimmyHu's user avatar
  • 5,572
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++...
JimmyHu's user avatar
  • 5,572
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 ...
Linny's user avatar
  • 10.3k
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 ...
Koronis Neilos's user avatar
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 ...
JimmyHu's user avatar
  • 5,572
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 ...
JimmyHu's user avatar
  • 5,572
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: ...
Harith's user avatar
  • 9,687
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 ...
JimmyHu's user avatar
  • 5,572
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 ...
JimmyHu's user avatar
  • 5,572
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 ...
JimmyHu's user avatar
  • 5,572
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 (...
digito_evo's user avatar
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?...
digito_evo's user avatar
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 ...
JimmyHu's user avatar
  • 5,572
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. ...
digito_evo's user avatar
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 ...
rm1948's user avatar
  • 185
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, ...
user14717's user avatar
  • 775
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 ...
Space Gaori's user avatar
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 ...
JimmyHu's user avatar
  • 5,572
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 ...
JimmyHu's user avatar
  • 5,572
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 ...
serafean's user avatar
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 ...
saxbophone's user avatar
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 ...
digito_evo's user avatar
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 ...
digito_evo's user avatar
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 ...
AJMansfield's user avatar
  • 1,513