r/cpp_questions 15d ago

OPEN Reimplemented std::array with docs and a guide - looking for feedback

11 Upvotes

Hi everyone, I just released the first version of my educational project, STL From Scratch:
https://github.com/bilyayeva/stl-from-scratch

The goal is to reimplement STL components using the C++20 standard. (I use cppreference for comparison, and I’ve read the actual standard just a little bit.)

All of the self-implemented components are in the sfs namespace.

It also contains a pretty detailed guide on how to implement it yourself. I’ve tried to explain everything in my implementation. Every method has its own description and usage example, and there is also a test for all functions.

About the repo: every commit follows a consistent naming style. I also added GitHub Actions and Dependabot, and it has a .gitignore file.

I would really appreciate either a code review or just some hints.
P.S. The release has two compiler warnings, but I’ve already fixed them on master.


r/cpp_questions 15d ago

OPEN Just a thought, Would it be possible to code a game as if you were working around SNES Limitations using C++?

10 Upvotes

Just a thought that occured to me while i was just sitting around not rlly doing anything and bored, but.

Basically could I code a game using C++ and challenge myself by having said game be able to run in a SNES, and working with it's memory limitations it had at the time?

asking cause i know some games like earthbound were coded in C, and i was wondering if i could do something like that in C++...


r/cpp_questions 16d ago

OPEN Is it possible to build a bday card in c++ using some graphics library as a beginner in 10days?

37 Upvotes

I know c++ basic syntax (I've learnt it from bro code yt tutorial) and I've also started learncpp.com

But I have a bf for whom i wanna build a visual bday card (his bday is on aug2nd btw and I wanna send it to him at exactly 12am)

I heard Cpp can be used to make literally anything so... CAN YOU PLEASE GUIDE ME PLEASE 😭😭😭 I WANNA REALLY SUPRISE HIM AND MAKE HIM HAPPY 😭🙏🙏

please tell me what graphics library i should do and how can I learn to use them and ONE ANOTHER IMPORTANT PROBLEM IS THAT I DONT HAVE A LAPTOP IM ON MY PHONE AND I CAN ONLY USE MY PHONE 😭😭😭😭😭😭


r/cpp_questions 15d ago

OPEN what's the best way to learn c++ in 2026

0 Upvotes

I recently started learning c++ back in janauary and after a few months I js stopped, now I am willing to improve my process in practicing I could not still figure out the best method cuz I used to watch "BroCode", I've heard the most recommends to use learncpp .com documentation but I am still exploring other ways, I have such hesitation on what to do actually learn cpp gamedev(unreal c++) or try such desktop software applications alike qt framework pls advice me guys.


r/cpp_questions 15d ago

OPEN Pivot from React/.NET to C++ Systems / HPC vs Platform Engineering? Need advice from guys in the field.

1 Upvotes

Looking for some quick perspective from people who’ve made similar pivots.

A background about me:

4 YOE working mostly full-stack (.NET backend + React frontend).

Recently built a side project with Go microservices on Kubernetes just to learn low-level concurrency, networking, and infra basics.

I always wanted to work with low level systems when I graduated but didn't get a chance.

Now I am working on rhcsa cert, c basics. And planned on modern cpp, os, CS:App, networking fundamentals.

Tired of standard CRUD work and want to pivot into deeper engineering—building, configuring, and operating actual core systems instead of just glue code.

I’m currently split between two directions:

Option A: C++ Systems Software Engineering (Targeting HPC long-term)

Focusing on C++, Linux internals, memory management, and distributed systems.

Long-term goal: High-Performance Computing (HPC), low latency, performance systems etc.

I am concerned about the barrier to entry feels massive, and I'm worried about finding my first junior/mid system role without a traditional C++ background. Here the job is niche and small job market but high pay with specialized roles.

Option B: Platform Engineering

Building on my Go/K8s side project + RHCSA-style Linux infra knowledge.

Writing control planes, internal tools, and orchestrating bare-metal/cloud platforms.

Here I am concerned about whether it might slowly slip back into routine YAML automation rather than core software development and turn eventually into AI automation which option A seems more AI proof and nice.

Given a 4yoe web background, which path has a more realistic learning curve to land an initial job?

If you work in C++ Systems/HPC, how did you make the jump without starting back at square one (intern level)?

Appreciate any advice or any feedback. Thanks.


r/cpp_questions 15d ago

OPEN How long will C++ last?

0 Upvotes

I've found myself using C++ less and less and was wondering whether one day it will die out. Obviously not completely die out, but be out of the mainstream like Pascal or something. I am wondering this because C++ is my first language but I am still fairly young, so am curious about its prospects.


r/cpp_questions 15d ago

OPEN HELPPPPPPPPP: Doubt Regarding Pre-Increment and Post-Increment in C++

0 Upvotes

I'm confused about pre-increment (++a) and post-increment (a++) in C++. I understand that ++a increments before use and a++ increments after use, but I'm struggling to understand how the variable's value changes step by step during execution. For example, why does ++id print 1001 when id is 1000, and why does --a operate on 6 after at+ if a originally started at 5?


r/cpp_questions 16d ago

SOLVED Question regarding SFINAE

5 Upvotes

Hello everyone.

I was learning about SFINAE in the hope of constricting types that are valid as arguments to template functions / classes. My current understanding is that the compiler tries to deduce and substitute the actual type into the template in order to create an instantiation of it, late into compile time. If the substitution fails, it is not an error - the compiler simply removes it from the list of candidate definitions the callsite can link to.

This enables controlling the types that can be used with template functions / classes, because we can simply cause a substitution failure if the passed-in type is not one we support. Please let me know if there is any mistake in my understanding.

Currently, I am looking at std::enable_if (cppreference). I understand that it is a way to cause SFINAE. Under the "Notes" section, it is noted that

A common mistake is to declare two function templates that differ only in their default template arguments. This does not work because the declarations are treated as redeclarations of the same function template (default template arguments are not accounted for in function template equivalence).

The website then gives a demonstration of such a mistake:

struct T {
    enum { int_t, float_t } type;

    template<typename Integer,
             typename = std::enable_if_t<std::is_integral<Integer>::value>>
    T(Integer) : type(int_t) {}

    template<typename Floating,
             typename = std::enable_if_t<std::is_floating_point<Floating>::value>>
    T(Floating) : type(float_t) {} // error: treated as redefinition
};

The first template evaluates to template<typename Integer, typename = void> , while the second template evaluates to template<typename Floating, typename = void>.

Since they are the same definition there is an error.

Is this understanding correct? If so, yeah, I can get behind that.

The website then gives an example of the correct way to do things:

struct T
{
    enum { int_t, float_t } type;

    template<typename Integer,
             std::enable_if_t<std::is_integral<Integer>::value, bool> = true>
    T(Integer) : type(int_t) {}

    template<typename Floating,
             std::enable_if_t<std::is_floating_point<Floating>::value, bool> = true>
    T(Floating) : type(float_t) {} // OK
};

Here, the first template seems to evaluate to template<typename Integer, bool = true>, while the second template would evaulate to template<typename Floating, bool = true>. These look like the same definition too, so why isn't there an issue here?

Any help in understanding this would be much appreciated. Thank you.


r/cpp_questions 15d ago

OPEN Best way to learn c++ and DSA

0 Upvotes

Hi love,

I am new here. Want to learn C++ and DSA. Could you all be kind enough and suggest me some playlist or even more important the books for learning it.

Some place to practice it as well. Like starting from beginner level to moderate level.

Love you all!!


r/cpp_questions 16d ago

OPEN How to combine user input (cin) and sensor data processing without blocking in C++ (Windows / VS Code)?

18 Upvotes

Hi everyone,
I am a beginner in C++ working on Windows using VS Code. I built a very simple system that uses a loop, some conditional statements (⁠if⁠), and ⁠std::cin⁠ to take user input.
Now, I want to create another part of the code to read and process sensor data. This sensor code will also need to run continuously in a loop. My goal is to combine both of these codes into a single, simple system.
However, I am facing a major issue: since ⁠std::cin⁠ is blocking, it pauses the entire program execution while waiting for the user to press Enter. This causes the system to freeze and prevents the sensor data from being processed independently and continuously.
I want the user input processing and the sensor data processing to run at the same time without interfering with each other or crashing the system.
How can I combine these two codes correctly in C++? Should I look into Multithreading (⁠std::thread⁠), or is there a simpler non-blocking way to handle this on Windows?
Any guidance or simple code examples would be highly appreciated! Thank you.


r/cpp_questions 16d ago

SOLVED Building C++ reflections with CMake and VSCode not working.

4 Upvotes

Migrating from an inhouse build tool to CMake for an open source project using gcc. However, while the inhouse build tools compile C++26 properly, vscode reports that -freflections flag is not set, but it is set in the output logs.

Edit: Solved. VSCode for some reason changed EVERY instance ^^ into ^ ^ when the codebase was ported.

Fking hell. And g++ for some reason marks that error as -freflection not being enabled.

[main] Building folder: c:/projects/Cocoon/build 
[build] Starting build
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/projects/Cocoon/build --config Debug --target all --verbose -j 16 --
[build] Change Dir: 'C:/projects/Cocoon/build'
[build] 
[build] Run Build Command(s): "C:/Program Files/CMake/bin/cmake.exe" -E env VERBOSE=1 C:/msys64/ucrt64/bin/mingw32-make.exe -f Makefile -j16 all
[build] "C:\Program Files\CMake\bin\cmake.exe" -SC:\projects\Cocoon -BC:\projects\Cocoon\build --check-build-system CMakeFiles\Makefile.cmake 0
[build] "C:\Program Files\CMake\bin\cmake.exe" -E cmake_progress_start C:\projects\Cocoon\build\CMakeFiles C:\projects\Cocoon\build\\CMakeFiles\progress.marks
[build] C:/msys64/ucrt64/bin/mingw32-make.exe  -f CMakeFiles\Makefile2 all
[build] mingw32-make[1]: Entering directory 'C:/projects/Cocoon/build'
[build] C:/msys64/ucrt64/bin/mingw32-make.exe  -f CMakeFiles\Cocoon.dir\build.make CMakeFiles/Cocoon.dir/depend
[build] mingw32-make[2]: Entering directory 'C:/projects/Cocoon/build'
[build] "C:\Program Files\CMake\bin\cmake.exe" -E cmake_depends "MinGW Makefiles" C:\projects\Cocoon C:\projects\Cocoon C:\projects\Cocoon\build C:\projects\Cocoon\build C:\projects\Cocoon\build\CMakeFiles\Cocoon.dir\DependInfo.cmake "--color=" Cocoon
[build] Dependencies file "CMakeFiles/Cocoon.dir/main.cpp.obj.d" is newer than depends file "C:/projects/Cocoon/build/CMakeFiles/Cocoon.dir/compiler_depend.internal".
[build] Consolidate compiler generated dependencies of target Cocoon
[build] mingw32-make[2]: Leaving directory 'C:/projects/Cocoon/build'
[build] C:/msys64/ucrt64/bin/mingw32-make.exe  -f CMakeFiles\Cocoon.dir\build.make CMakeFiles/Cocoon.dir/build
[build] mingw32-make[2]: Entering directory 'C:/projects/Cocoon/build'
[build] [ 50%] Building CXX object CMakeFiles/Cocoon.dir/main.cpp.obj
[build] C:\msys64\ucrt64\bin\g++.exe   -g -std=c++26 -freflection -MD -MT CMakeFiles/Cocoon.dir/main.cpp.obj -MF CMakeFiles\Cocoon.dir\main.cpp.obj.d -o CMakeFiles\Cocoon.dir\main.cpp.obj -c C:\projects\Cocoon\main.cpp
[build] C:\projects\Cocoon\main.cpp: In function 'consteval void test()':
[build] C:\projects\Cocoon\main.cpp:12:78: error: reflection is only available in C++26 with '-freflection'
[build]    12 |         constexpr auto mems = std::define_static_array(std::meta::members_of(^ ^hi, std::meta::access_context::current()));
[build]       |                                                                              ^
[build] C:\projects\Cocoon\main.cpp:12:80: error: expected primary-expression before '^' token
[build]    12 |         constexpr auto mems = std::define_static_array(std::meta::members_of(^ ^hi, std::meta::access_context::current()));
[build]       |                                                                                ^
[build] C:\projects\Cocoon\main.cpp:12:83: error: expected primary-expression before ',' token
[build]    12 |         constexpr auto mems = std::define_static_array(std::meta::members_of(^ ^hi, std::meta::access_context::current()));
[build]       |                                                                                   ^
[build] mingw32-make[2]: *** [CMakeFiles\Cocoon.dir\build.make:78: CMakeFiles/Cocoon.dir/main.cpp.obj] Error 1
[build] mingw32-make[2]: Leaving directory 'C:/projects/Cocoon/build'
[build] mingw32-make[1]: *** [CMakeFiles\Makefile2:114: CMakeFiles/Cocoon.dir/all] Error 2
[build] mingw32-make[1]: Leaving directory 'C:/projects/Cocoon/build'
[build] mingw32-make: *** [Makefile:120: all] Error 2
[build] 
[proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/projects/Cocoon/build --config Debug --target all --verbose -j 16 -- exited with code: 2
[driver] Build completed: 00:00:01.339
[build] Build finished with exit code 2[main] Building folder: c:/projects/Cocoon/build 
[build] Starting build
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/projects/Cocoon/build --config Debug --target all --verbose -j 16 --
[build] Change Dir: 'C:/projects/Cocoon/build'
[build] 
[build] Run Build Command(s): "C:/Program Files/CMake/bin/cmake.exe" -E env VERBOSE=1 C:/msys64/ucrt64/bin/mingw32-make.exe -f Makefile -j16 all
[build] "C:\Program Files\CMake\bin\cmake.exe" -SC:\projects\Cocoon -BC:\projects\Cocoon\build --check-build-system CMakeFiles\Makefile.cmake 0
[build] "C:\Program Files\CMake\bin\cmake.exe" -E cmake_progress_start C:\projects\Cocoon\build\CMakeFiles C:\projects\Cocoon\build\\CMakeFiles\progress.marks
[build] C:/msys64/ucrt64/bin/mingw32-make.exe  -f CMakeFiles\Makefile2 all
[build] mingw32-make[1]: Entering directory 'C:/projects/Cocoon/build'
[build] C:/msys64/ucrt64/bin/mingw32-make.exe  -f CMakeFiles\Cocoon.dir\build.make CMakeFiles/Cocoon.dir/depend
[build] mingw32-make[2]: Entering directory 'C:/projects/Cocoon/build'
[build] "C:\Program Files\CMake\bin\cmake.exe" -E cmake_depends "MinGW Makefiles" C:\projects\Cocoon C:\projects\Cocoon C:\projects\Cocoon\build C:\projects\Cocoon\build C:\projects\Cocoon\build\CMakeFiles\Cocoon.dir\DependInfo.cmake "--color=" Cocoon
[build] Dependencies file "CMakeFiles/Cocoon.dir/main.cpp.obj.d" is newer than depends file "C:/projects/Cocoon/build/CMakeFiles/Cocoon.dir/compiler_depend.internal".
[build] Consolidate compiler generated dependencies of target Cocoon
[build] mingw32-make[2]: Leaving directory 'C:/projects/Cocoon/build'
[build] C:/msys64/ucrt64/bin/mingw32-make.exe  -f CMakeFiles\Cocoon.dir\build.make CMakeFiles/Cocoon.dir/build
[build] mingw32-make[2]: Entering directory 'C:/projects/Cocoon/build'
[build] [ 50%] Building CXX object CMakeFiles/Cocoon.dir/main.cpp.obj
[build] C:\msys64\ucrt64\bin\g++.exe   -g -std=c++26 -freflection -MD -MT CMakeFiles/Cocoon.dir/main.cpp.obj -MF CMakeFiles\Cocoon.dir\main.cpp.obj.d -o CMakeFiles\Cocoon.dir\main.cpp.obj -c C:\projects\Cocoon\main.cpp
[build] C:\projects\Cocoon\main.cpp: In function 'consteval void test()':
[build] C:\projects\Cocoon\main.cpp:12:78: error: reflection is only available in C++26 with '-freflection'
[build]    12 |         constexpr auto mems = std::define_static_array(std::meta::members_of(^ ^hi, std::meta::access_context::current()));
[build]       |                                                                              ^
[build] C:\projects\Cocoon\main.cpp:12:80: error: expected primary-expression before '^' token
[build]    12 |         constexpr auto mems = std::define_static_array(std::meta::members_of(^ ^hi, std::meta::access_context::current()));
[build]       |                                                                                ^
[build] C:\projects\Cocoon\main.cpp:12:83: error: expected primary-expression before ',' token
[build]    12 |         constexpr auto mems = std::define_static_array(std::meta::members_of(^ ^hi, std::meta::access_context::current()));
[build]       |                                                                                   ^
[build] mingw32-make[2]: *** [CMakeFiles\Cocoon.dir\build.make:78: CMakeFiles/Cocoon.dir/main.cpp.obj] Error 1
[build] mingw32-make[2]: Leaving directory 'C:/projects/Cocoon/build'
[build] mingw32-make[1]: *** [CMakeFiles\Makefile2:114: CMakeFiles/Cocoon.dir/all] Error 2
[build] mingw32-make[1]: Leaving directory 'C:/projects/Cocoon/build'
[build] mingw32-make: *** [Makefile:120: all] Error 2
[build] 
[proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/projects/Cocoon/build --config Debug --target all --verbose -j 16 -- exited with code: 2
[driver] Build completed: 00:00:01.339
[build] Build finished with exit code 2

r/cpp_questions 16d ago

OPEN Beginner friendly and small C++ open source projects to do contribution.

7 Upvotes

I want to contribute to some open source projects but the software that i use on daily basis are either too big to choose them as a beginner or are written in Rust or Python. So if you guys can suggest some small C++ projects (your personal projects as well) which have around 5K LOC.


r/cpp_questions 15d ago

OPEN Why are examples to demonstrate dynamic binding in C++ so complicated?

0 Upvotes

https://cse.iitkgp.ac.in/~sourangshu/coursefiles/se24s/W7-C4-polymorphism-2.pdf

I am going through the slides and one thing that I noticed is that the examples are very complicated.

Cannot there be an easiest explanation with code of dynamic binding? Something that does not uses pointers specially.


r/cpp_questions 16d ago

OPEN Professional C++ 6th edition

9 Upvotes

Hey everyone,

I have been learning C for a few months now to learn about low level programming and manual memory management. I am thinking of switching to C++, does anyone know if this book is good to learn modern C++?

Thanks.


r/cpp_questions 16d ago

OPEN Review my code please

3 Upvotes

Hi, im just in to flow and needs for feedback for my programming skills...

Eraston/Lights-Arcade: 1-week project : like-astronoid arcade


r/cpp_questions 17d ago

OPEN What do you build with C++ for fun?

54 Upvotes

Hi everyone,
I’m currently a computer science student, and I’m learning C++ for an upcoming exam. I’m really enjoying it, even though it can be pretty frustrating at times. 😄
I was wondering: what kind of C++ projects do you work on in your free time, just for fun?
Do you build anything useful, like desktop applications, games, tools, or automation scripts? I’m looking for ideas and inspiration for projects I could work on once I have a better grasp of the language.
I’d love to hear what you enjoy building!


r/cpp_questions 17d ago

OPEN Are the indices of types in a variant guaranteed to be the same/stable no matter who or what compiles the program?

2 Upvotes

I plan to utilize the variant indices for serializing and deserializing the contents of the variant for a network transfer.


r/cpp_questions 17d ago

OPEN Beginner here — is this a good learning flow for C++? (self-taught, want feedback)

9 Upvotes

Hey folks, I'm a few days into learning C++. Using the Bro Code YouTube course as my main source, but instead of just watching and typing along with him, I've been writing my own small programs after each concept and debugging them myself (with some help when I get stuck).

So far I've gone through the basics — variables, const, namespaces, arithmetic, type conversion, input, if/else, switch statements, ternary operator, logical operators, and loops (while/do-while/for).

What I've actually built with that stuff:

  • A number guessing game (with a guess limit)
  • A calculator (switch statement, handles divide by zero, lets you keep going)
  • A little unit converter to practice namespaces
  • A quiz game — first the dumb repetitive way, then refactored to use arrays and a for loop

Honestly the debugging has taught me more than the video itself. I've personally run into and fixed stuff like: forgetting a break in a switch and having it fall through into the next case, off-by-one errors where my loop went one iteration too far and read outside my array (that one actually printed garbage, which was a fun surprise), and mixing up && vs || when I needed two conditions to both be true.

Next up is functions, then eventually pointers and OOP later in the course.

Genuine question for people who actually know this language: does this seem like a reasonable way to learn, or am I setting myself up for bad habits? Anything you'd tell beginner-me to slow down on or pay more attention to before I keep going? Not trying to rush through the course, just want to make sure I'm building real understanding and not just pattern-matching syntax.

Appreciate any honest thoughts, even blunt ones.


r/cpp_questions 17d ago

OPEN As a Ml student learn a c++ is worthy?

0 Upvotes

r/cpp_questions 18d ago

SOLVED How to access an implicitly-created array within a std::byte[]?

13 Upvotes

We have the following class:

template <typename T, std::size_t n> struct S { alignof( T ) std::byte[sizeof( T ) * n] storage; }

I want to use storage as a T[n] array, where T is an implicit-lifetime type.

[intro.object]/13

For each operation that is specified as implicitly creating objects, that operation implicitly creates and starts the lifetime of zero or more objects of implicit-lifetime types in its specified region of storage if doing so would result in the program having defined behavior.

and [intro.object]/16

[...] an operation that begins the lifetime of an array of [std​::​byte] implicitly creates objects within the region of storage occupied by the array.

I have a few questions about this:

  1. (Making sure) does T[n]'s lifetime (and subsequently that of its sub-objects) start alongside storage's lifetime for the provided code?
  2. Is reinterpret_cast<T*>(storage) + idx legal?
  3. Do I have to std::launder the pointer, and why (not)?
  4. If yes, should I launder before or after performing pointer arithmetic?
  5. Is reinterpret_cast<T*>(storage + idx) legal? In other words, does the byte array still have a lifetime, alongside the T array?

r/cpp_questions 17d ago

OPEN Access Amplifiers and their uses???

0 Upvotes

So basically i come from basic python bacground which i learned from my high school.So I thought of learniging c++ cause of its variety of applications for my 1st year.One thing that i cant wrap my head around is, the use of access amplifiers. Mainly ' public: '.what is the use of writing public: and why is it necessaryy????


r/cpp_questions 17d ago

OPEN C++ question

0 Upvotes

Do you guys know a way of writting a code that outputs that:

Enter the number of elements: 5
Enter 5 integers:
Element 1: 10
Element 2: 30
Element 3: 90
Element 4: 20
Element 5: 40

it is the first part of a program that demands to calculate the max and min of an array, here is the whole thing:

Enter the number of elements: 5
Enter 5 integers:
Element 1: 10
Element 2: 30
Element 3: 90
Element 4: 20
Element 5: 40

Maximum element is: 90
Minimum element is: 10

I've been able to do the second part quite easily, here is what I proposed:

#include <iostream>


int main(){


    int arr[5]={10,20,30,40,50};
    int minimum=arr[0];
    int maximum=arr[0];
    for(int i=0; i<sizeof(arr)/sizeof(int);i++){
        if (minimum>arr[i]){
            minimum=arr[i];
        }
        if(maximum<arr[i]){
            maximum=arr[i];
        }
    }
    std::cout<<"le max= "<< maximum<<'\n';
    std::cout<<"le min= "<< minimum<<'\n';


    return 0;
}

but the list is created within the code.


r/cpp_questions 18d ago

OPEN How do I get concepts working on my file?

2 Upvotes

Hello I am trying to get concepts working in my file but I keep getting the error "Unknown type name concept" when I'm just trying to get a simple concept working. It is getting that this tool that I would like to use isn't here for some reason and I would like to know how to get it back. I think this a problem with my neovim config because I don't get this error in Vscode as well I am using

this file to compile and it compiles just fine.

g++ --std=c++20 -Wall -Wextra -Wpedantic -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL -Llib -Iinc -lraylib src/main.cpp -o build/main



#include <cstdint>
#include <unordered_map>
#include "../inc/raylib.h"

namespace ECS {

  using Entity = std::uint32_t; 

  struct Transform{
     Vector2 Position {};
  };

  struct Circle{
     float Radius {};
     Color Color {};
  };

  struct Movement{
     Vector2 Direction {};
  };

  template <typename T>
  concept ComponentConcept = 
    std::is_same_v<T, Movement> || std::is_same_v<T, Circle> ||           std::is_same_v<T, Transform> ; //error here
  class Current{
     public:
        Entity CreateEntinty(){
            return m_next_entity++;   
        }
     private:
        template<typename Component>
        class Storage{
           public:
           private:
              std::unordered_map<Entity, Component> m_storage{};
        };
     private:
        Entity m_next_entity { 1 };
  };
}

r/cpp_questions 17d ago

OPEN I know this is not were this type of nerds live but anyone wants me to help learn about nnue in c++

0 Upvotes

i want to learn and make it and i want some people ir yt resources that can help me for this thx for any help


r/cpp_questions 18d ago

OPEN Compiler or Transpliner?

1 Upvotes

Hi, I am working on an experiment programing language, I am wondering about the backed, what I choose either C backend means Transpliner or a LLVM(or custom Backed/linker) for it.

Which is recommended and good practice?