Questions tagged [c++20]
Code that is written to the 2020 version of the C++ standard. Use in conjunction with the 'c++' tag.
369 questions
Score of 3
3 answers
234 views
Lightweight C++ Netpbm image handler
I am writing a lightweight C++ Netpbm image handler for practicing my C++ skills.
These formats allows for bitmaps, grayscale and colored images with individual components stored over 8 or 16 bits.
I ...
Score of -8
0 answers
53 views
Am I a senior developer? [closed]
Based on syntax, architecture and design of this compiler CLI tool written in C++, am I a senior developer?
Code Link : main.cpp
To run or test the CLI tool compile that code using g++ compiler as a c+...
Score of 6
3 answers
267 views
Simple streambuf for reading std::span
I need to read data from a std::span in C++20. I know there is a std::spanstream in C++23, but it's not available to me
I wrote ...
Score of 6
3 answers
693 views
CLI Task Tracker
This project was implemented according to https://roadmap.sh/projects/task-tracker guidelines.
GitHub repo: https://github.com/PavloShutz/cli-task-tracker.git
main.cpp
...
Score of 8
2 answers
908 views
Batcher's sort in C++20 - Take II
Intro
This post is the continuation of Batcher's sort in C++20.
This time, I have incorporated the advices of
Martin R,
Toby Speight,
Chris.
Code
batcherssort.h:
<...
Score of 7
3 answers
1031 views
Batcher's sort in C++20
Intro
This is the very first time I actually expose myself to C++20 (concepts in this case). I decided to rewrite the Batcher's sort.
(This post has a continuation: Batcher's sort in C++20 - Take II.)
...
Score of 3
2 answers
190 views
CUDA BFS algorithm
I've recently been working on a project that measured difference on different scale/type of mazes between CPU and GPU. I chose probably the most straightforward one, which is BFS.
I won't really ...
Score of 7
4 answers
553 views
MinMaxStack - tracks minimum and maximum values
I'm implementing a MinMaxStack<T> in C++20 that tracks minimum and maximum values. The class needs T to support ...
Score of 7
3 answers
871 views
C++17/20 templated LRU cache : how should get* handle misses? (exception vs std::optional vs pointer)
I’m implementing a templated LRU cache in C++17 and C++20.
High-level design:
Recency: ...
Score of 4
2 answers
666 views
Reference counted smart pointer with concept
I wrote a simple reference counted smart pointer. The reference count is supposed to be inside the object it owns (not the smart ptr itself, like std::shared_ptr) ...
Score of 2
2 answers
233 views
Affect a repetition of an argument N times (for array construction)
Consider the following (C++20) function (from the solution to this StackOverflow question):
...
Score of 7
1 answer
287 views
RAII Wrapper For Registering/Mapping CUDA Resources
I've implemented a resource management class for CUDA interop using RAII to ensure exception safety. The goal is to handle the registration/unregistration and mapping/unmapping, of graphics resources (...
Score of 1
0 answers
108 views
Sphere Generation System With CUDA-OpenGL Interop
This is some kind of follow up to my previous question, this question will be more focused on the actual tessellating pipeline.
What I changed from previous question
Implemented the async sphere ...
Score of 5
5 answers
1229 views
c++ format_to verbosity
I was concatenating a lot of strings lately, usually the results of std::format:
...
Score of 10
3 answers
1325 views
C++17: shared_mutex protected DNS cache (rare writes, many reads) return-by-value vs decltype(auto)?
I’d appreciate a review of this small DNS cache.
It stores pairs of domain and IP address
and uses a std::shared_mutex because reads are frequent and writes are ...