Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
6 votes
2 answers
371 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,060
5 votes
2 answers
939 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
  • 7,004
3 votes
1 answer
47 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,060
3 votes
1 answer
44 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,060
2 votes
1 answer
53 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,060
3 votes
1 answer
139 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
544 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
55 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,060
6 votes
2 answers
353 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
121 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
243 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
45 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,060
2 votes
1 answer
62 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,060
2 votes
1 answer
97 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
199 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
248 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
78 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
165 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