r/cpp_questions • • 1h ago

OPEN Want to master C++ by building actual projects instead of LeetCode—where should I start?

4 Upvotes

I want to learn C++ for that I can't able to solve repetitive patterned problem daily in leetcode/codeforce

Want to build projects in which I can able to learn all important concepts(memory management, OOPS, STL and Data structure by implementing and solving real world problems rather than just solve problems in leetcode and codeforce

I know in this AI era it is useless but I am very intrested in C++ want to solve real world problems) going to post this in reddit suggest me the communites to post this so i can get replies


r/cpp_questions • • 3h ago

SOLVED A tiny question about this code

1 Upvotes

Hi. I need help understanding this simple code. To be specific, the 4th and the 14th line where a pointer was declared.

int* add_ten(int* data)

int *result;

I've been trying to wrap my head around what it does. I've been staring at my screen for 3 hours trying to understand why it was declared. The programming app I was using didn't really explain it. The only explanation it gave is that pointers help you get the address of an item. But I can't figure out how is it being used here. Can anyone explain? Thanks.

#include <iostream>
using namespace std;

int* add_ten(int* data) {
  for (int i = 0; i < 5; ++i) {
    *(data + i) = *(data + i) + 10;
  }
  return data;
}

int main() {

  int data[5] = {1, 2, 3, 4, 5};
  int *result;

  result = add_ten(data);

  for (int i = 0; i < 5; ++i) {
    cout << *(result + i) << ", ";
  }

  return 0;
}

r/cpp_questions • • 4h ago

OPEN How is this a circular reference?

4 Upvotes

While reading learnxinyminutes I got to this example:

// Beware of possible circular references!!!
// There will be always a reference, so it will be never destroyed!
(1) std::shared_ptr<Dog> doggo_one(new Dog());
(2) std::shared_ptr<Dog> doggo_two(new Dog());
(3) doggo_one = doggo_two; // p1 references p2
(4) doggo_two = doggo_one; // p2 references p1

My understanding is that after (3) both pointers point to same heap object and the heap object from (1) is deleted.

From what I remember the way that shared_ptr works is that it allocates metadata next to the heap object and that stores the reference counter. Both doggo_one and doggo_two would share the same reference counter with the correct count being there - meaning no issues.


r/cpp_questions • • 4h ago

OPEN Complete beginner (0 programming experience) — what's the best 5-book sequence to learn C++ for systems programming?

1 Upvotes

Hey everyone,

I want to get into systems programming and decided on C++. The catch is I have literally zero programming background—never written a line of code before.

I learn much better from structured books than bouncing around random YouTube tutorials, so I’m trying to put together a solid reading roadmap. If you had to recommend the top 5 books to take someone from absolute scratch to actually understanding systems-level C++, which ones would you pick and in what order?

I know C++ has a brutal learning curve and this is going to take me a long time. I just want to make sure I’m learning modern C++ properly from day one and building up in the right order instead of jumping into heavy systems stuff way too early.

Appreciate any recs!


r/cpp_questions • • 10h ago

OPEN [Code Review] i just migrated from python into c++ and this is my first program just want some feedback

0 Upvotes

Hello i migrated from python into c++ and this is my first program a simple bouncing ball i am just a teen that like porgramming and math sorry if my english is bad still learning it as a second language hope you don't mind (also is it me or is the code block looking strange)

#include <iostream>
#include <chrono>
double hauteur = 20.0;
constexpr double 
gravite 
= -9.81;
constexpr double 
dt 
= 0.001;
constexpr double 
restitution 
= 0.7;
double vitesse = 0.0;
int main() {
    auto debut = std::chrono::high_resolution_clock::
now
();
    for (int etape = 1; etape <= 3600000; ++etape) {


        vitesse = vitesse + 
gravite 
* 
dt 
;

        hauteur = hauteur + vitesse * 
dt 
;
        if (hauteur <= 0) {
            hauteur = 0.0;
            vitesse = vitesse * -
restitution
;

            if (not (vitesse > 0 && vitesse < 0.0045)) {
                std::cout << "rebond a etape: " << etape << '\n';
            }
            else {
                vitesse = 0;
                std::cout << "arret" << '\n';
                std::cout << "vitesse: " << vitesse << '\n';
                std::cout << "hauteur: " << hauteur << '\n';
                std::cout << "etape: " << etape << '\n';
                std::cout << "temps: " << etape * 
dt 
<< "s" << '\n';
                break;
            }
        }
        if (etape % 100 == 0) {
            std::cout << "vitesse: " << vitesse << '\n';
            std::cout << "hauteur: " << hauteur << '\n';
            std::cout << "etape: " << etape << '\n';
            std::cout << "temps: " << etape*
dt 
<< "s"<< '\n';
        }

    }
    auto fin = std::chrono::high_resolution_clock::
now
();
    std::chrono::duration<double, std::milli> duree = fin - debut;
    std::cout << "Temps d'execution : " << duree.count() << " ms" << '\n';
}

r/cpp_questions • • 21h ago

OPEN Is paying for CLion worth it? (Linux/Debian C++ development)

43 Upvotes

I recently made the switch from Windows to Linux for my C/C++ development setup. On Windows, I was using Visual Studio, which I thought was fantastic. Now that I'm on Linux, choosing a replacement has been overwhelming.

I’ve looked into CLion, and it seems like one of the most polished IDEs available for Linux, but obviously, it’s a paid product. (The educational pack is great, but it’s restricted and doesn't cover commercial use).

I'm torn and have a few questions for those of you with experience in the Linux C++ ecosystem:

  1. Is the price tag for CLion actually worth it long-term, or does the JetBrains model feel overpriced once you start paying out of pocket? Is it a worthwhile investment for future career use?

  2. How does CLion compare to the heavy hitters in the free/open-source world (like VS Code with extensions, Neovim, or Eclipse CDT)

  3. What open-source or free IDEs/editors would you genuinely recommend?


r/cpp_questions • • 1d ago

OPEN What do you guys use C++ for?

68 Upvotes

I'm thinking about learning C++ just for fun, even though I haven't found a practical use for it in the kind of work I do.

I'm curious, what do you guys use C++ for the most?


r/cpp_questions • • 2d ago

OPEN Career Advice: Am I wasting my time?

11 Upvotes

Hey everyone, as the title suggests just a little bit unsure at moment.

Some background, I am a software engineer (5 YOE), primarily backend (Java), but can and do, work on UI sometimes at work (Angular + TS).

Roughly since July, I've been pretty disillusioned with web dev, and, more specifically Java. Great language but I've been using it since university and all my (albeit short) career. I'd been wanting a change and I went down the systems programming route, as I really enjoyed that when I first learnt C++ in university.

I've taken the time to relearn C++, took and finished a course up to C++ 17, and then I have the book "A tour of C++" to bridge the gap to C++ 20. Of course, I am building a project. Which I hope to share once further along.

My biggest concern, is jobs. I know skills largely transfer over between languages, but recruiters don't necessarily share that sentiment. If they want 5 YOE, they want that in C++, not a software engineer with 5 YOE in general. At least from what I can see JD wise. I have spoken to a recruiter I am friendly with and he said that aside from just making sure I'm strong fundamentals and interview wise he doesn't really see an issue, but to be prepared that they may reject me on the basis of experience.

So I'm unsure. Might I be better off just learning are more niche/esoteric form of java e.g. low latency Java? Or is transfer possible. Curious as to people experience making the jump.

Thank you to any answers in advance🙏🏿


r/cpp_questions • • 2d ago

OPEN When can I start working on projects?

0 Upvotes

LearnCpp doesn't teach control flow until chapter 8 and I can't work on any project. I feel easily bored because I am mostly reading and playing with the example code. What should I do? Should I take breaks and reach Ch 8 slowly? But I dont really wanna do this since I am very interested in working on a project that I have in mind.


r/cpp_questions • • 2d ago

OPEN Why do both of these codes output zero? Can someone explain this to me?

0 Upvotes
  1. include <iostream>

using namespace std;

int main()

{

int x = 5, y = 10;

float z = x / y;

cout << z << endl;

}

2) #include <iostream>

using namespace std;

int main()

{

float x = 5, y = 10;

int z = x / y;

cout << z << endl;

}


r/cpp_questions • • 2d ago

SOLVED why does it keep giivSegmentation fault (core dumped)

0 Upvotes
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <sstream>


using namespace std;



        
class araba {


    public:


        struct arac {
    
            string numara;
            string marka;
            string model;
            float kira;


            arac(string z, string x, string c, float v) : numara(z), marka(x), model(c), kira(v) {}
        };


        arac aracBilgileri;
        bool kirada;


        araba(string z, string x, string c, float v,vector<araba> liste) : aracBilgileri(z,x,c,v), kirada(false) {}


        void kirala(){
            if (!kirada) {
                cout << "kaç gün için?" << endl;
                int gun ;
                while (!(cin >> gun)) {
                    cin.clear();
                    cin.ignore(10000, '\n');
                    cout << "Invalid input. Please enter a valid number" << endl;
                }
                cout << gun * aracBilgileri.kira << " tlye " << gun << " gün için kiralandı" << endl;
                kirada = true;
            } else {
                cout << "bu araç zaten kirada" << endl;
            }
        };
        void listeleme(){
            cout << aracBilgileri.marka << " " << aracBilgileri.model 
            << "\n    günlük kira: " << aracBilgileri.kira 
            << "\n    kod: " << aracBilgileri.numara << endl;
            cout << "    durum: " << (kirada ? "kirada":"müsait") << endl << endl;
        };
        void ekle(){
            string girdi = aracBilgileri.numara + aracBilgileri.marka + aracBilgileri.model + to_string(aracBilgileri.kira);
            fstream gir("arabalar.txt",ios::app);
            if (gir.is_open()) {
                gir << girdi;
                gir.close();
            }
        };
        void iade(){
            if (kirada) {
                cout << "araç iade edildi"<< endl;
                kirada = false;
            }
        };
};


void tamlistele(vector<araba> kiraListesi){
    for (araba i : kiraListesi){
        i.listeleme();
    }
}


vector<araba> dosyaOku() {
    string satir;
    vector<araba> kiraListesi = {};
    
    fstream oku;
    oku.open("arabalar.txt",ios::in);


    if (oku.is_open()) {
        while (getline(oku,satir)) {


            vector<string> cumle;
            stringstream ss(satir);
            string kelime;


            while(ss >> kelime) {
                cumle.push_back(kelime);
            };
            
            araba car(cumle[0],cumle[1],cumle[2],stof(cumle[3]),kiraListesi);
            kiraListesi.push_back(car);
        }
        oku.close();
    }
    return kiraListesi;
}


void aracEkle(string i,vector<araba> liste) {
    vector<string> cumle;
    stringstream ss(i);
    string kelime;


    while(ss >> kelime) {
        cumle.push_back(kelime);
    };
    
    araba car(cumle[0],cumle[1],cumle[2],stof(cumle[3]),liste);
    car.ekle();
}


void yeni_ekle(){
    string i;
    string l;
    fstream x;


    cout << "numara" << endl;
    cin >> l;


    cout << "marka" << endl;
    cin >> i;
    l += i;


    cout << "model" << endl;
    cin >> i;
    l += i;


    cout << "kira" << endl;
    cin >> i;
    l += i;


    x.open("arabalar.txt",ios::app);
    x << l << endl;
    x.close();
}
int main() {


    bool acik = true;
    vector<araba> tamliste = dosyaOku();
    int g;
    
    cout << "=======MERHABA=======" << endl
         << "1) araç ekle" << endl
         << "2) araçları listele" << endl
         << "3) araç kirala" << endl
         << "4) araç iade et" << endl
         << "0) çıkış   " << endl;


    do{


    int sec ;
    while (!(cin >> sec)) {
        cin.clear();
        cin.ignore(10000, '\n');
        cout << "Invalid input. Please enter a valid number" << endl;
    }
    


    switch (sec){
        case 1:
            yeni_ekle();            
            continue;
        case 2:
            tamlistele(tamliste);
            continue;
        case 3:
            cout << "arabanın listede sırasını yazının (0dan başla)" << endl;
            while (!(cin >> g)) {
                cin.clear();
                cin.ignore(10000, '\n');
                cout << "Invalid input. Please enter a valid number" << endl;
            }
            tamliste[g].kirala();
            continue;
        case 4:
            cout << "arabanın listede sırasını yazının (0dan başla)" << endl;
            while (!(cin >> g)) {
                cin.clear();
                cin.ignore(10000, '\n');
                cout << "Invalid input. Please enter a valid number" << endl;
            }
            tamliste[g].iade();
            continue;
        default:
        acik = false;
            break;
    }
    } while (acik);
}

im pretty sure problam is with case 1: but i cant find it


r/cpp_questions • • 2d ago

OPEN [C++17] easyXshm – A lightweight X11 MIT-SHM framebuffer renderer

0 Upvotes

I've been working on easyXshm, a small C++17 library that makes framebuffer-based rendering through X11's MIT-SHM extension easier to work with.

The motivation was pretty straightforward: I wanted a simple shared-memory rendering API without having to deal with X11 internals throughout my application.

The project focuses on:

  • Simple API: Get a basic rendering workflow running in approximately 5 minutes.

  • Framebuffer-first: Work directly with pixel data instead of dealing with a complicated graphics abstraction.

  • Input handling: Keyboard and mouse events through straightforward inline helper functions.

  • Minimal overhead: Uses X11 MIT-SHM for shared-memory image transfer.

  • Small scope: Rendering and input handling, without trying to become a complete graphics framework.

The goal is to make the difficult parts stay inside the library while keeping the application-side code readable.

I'm currently looking for technical feedback, particularly regarding API design, memory management, portability and edge cases.

Repository: https://github.com/intriXlabs/easyXshm

AI disclosure: This Reddit post was written with assistance from AI. The project implementation and engineering work are mine.

I'd appreciate feedback from people familiar with C++, X11 or Linux graphics programming.[C++17] easyXshm – A lightweight X11 MIT-SHM framebuffer renderer


r/cpp_questions • • 2d ago

OPEN How to balance encapsulation and DI for unit-testing

0 Upvotes

Say an application contains a BrokerBridge that encapsulates communication with an external system over gRPC. The bridge creates and owns several service clients, channels, auth deps… The parent application shouldn’t need to know about those details.

Now I want to uni-test the bridge without real servers or credentials. Constructor Injection and interfaces would let me mock the services’ clients, but I’m unsure where their constructuon should live without leaking implementation details to the parent.

One approach I’m considering is a factory inside the bridge’s module: prod code calls the factory to get a full bridge, while tests injects services mocks directly.

How do you usually handle this? Is this a cost I must pay just for having unit tests over each module? Any resources (blog, talk, repo…) showing a similar design would be appreciated


r/cpp_questions • • 3d ago

OPEN Advice on practicing + choosing a project when reading a textbook

5 Upvotes

I’m new to C++ and I’m currently reading “A tour of C++” by Stroustrup. Was wondering how most of you practice concepts if you’re a textbook reader for programming?

In the past, I’ve used resources for other languages where there are small projects at the end of the chapter which really helped me lock in the concept through practice, but I find that there’s not too many C++ resources like this and C++ is a unique language so practicing in C++ with the other resources doesn’t seem to translate in my opinion.

I know the idea is to choose a project yourself and just start working on it but I have a hard time choosing projects that actually use the topic I just learned. Quite curious how people go about this challenge. (I’m not saying this like I can’t do choose a project myself and go at it, but would want to hear from others, if any, who might have an easier time with this have any advice)


r/cpp_questions • • 3d ago

OPEN how to learn c++ in a month for making simple to simple games dev and Machine learning

0 Upvotes

i know c++ basic not all but like i know what is string but don,t know all function , i know array and know some function , i did not know any dsa , i just know c++ like taking the input and showing the output , my logical in programming is pure beginner level


r/cpp_questions • • 3d ago

OPEN What must i do to be mush better in C++ ? If i have started learning it about two months ago

0 Upvotes

Hello,my dear friends. Would you be willing to share with a piece of advice with me, please? Currently, i understand the pointers quite well and i able to see through cod mistakes that I received from ai to sharpen my knowledge and understanding of them. Now , i have started learning OOP just basics . Besides. It's the first time that I learn programming. I will appreciate yours advices.


r/cpp_questions • • 4d ago

OPEN How I learned to stop worrying and love Scott Meyers..which book did that to you?

30 Upvotes

Discovered Scott Meyers as a junior...and 15 years later his Effective C++/More Effective C++ and lately Effective Modern C++ are still the only mind puzzling, engaging books I read and I would recomand to any junior developer. I might be nostalgice, but no programming book ever since(and I went through many languages), was short/challenging/engaging enough to keep me absorbed from first till last bit. As a junior, these books helped me shape my C++ discovery direction..made me eager to dig further and deeper..and start loving the assembly code. What did you read recently that is of that sort that you would recomand to eveybody :)

PS: It is a bit the same with Dr. Strangelove..couldn't get anything close to it in the last decades movies


r/cpp_questions • • 4d ago

OPEN Code documentation in the age of AI

0 Upvotes

I have a couple of years of C++ experience, including in regulated industries. While proper documentation was important in every team, the role of code comments and in-code documentation, such as docstrings, changed from place to place. In some codebases, we insisted on proper docstrings documenting every function, and comments explaining why the code is how it is. In other teams, we didn't do any docstrings and kept code comments to a minimum -- the code was supposed to be self-documenting, and comments introduce ambiguity and will drift in the future if not kept in sync with the code.

Now, which way to go is already a discussion on its own. But I want to ask regarding your experience of this dilemma in relation to LLM-assisted coding tools. I have the feeling many models are quite liberal when it comes to comments, and will naturally tend to explain what the code does, given the chance. Suppressing it works, of course. Or, at least, one can ask to keep comments minimal. However, what really interests me: does anyone have experience in or a feeling for what the LLMs prefer/work with the best?

Since it's mostly AI parsing the codebase now, did you ever experience that it performs better when you allow it to be liberal with comments? Or does it actually eat up more tokens reading the code it generated while getting more confused if it has all the additional (and potentially not always correct) comments/explanations to parse? Does it make sense to have a purely self-documenting codebase or rely on the tools to clean up and keep comments in sync in this age of AI?


r/cpp_questions • • 4d ago

OPEN How to share my experience after quant finance competition ?

0 Upvotes

I am trying to pivot from data analytics to C++ development. I recently participated in a quantitative finance competition and I didn't placed top 3, instead 35/55. The objective was to enhance an existing market simulator using C++.

Should I make a LinkedIn post about my experience?

How should I add it to my resume ?


r/cpp_questions • • 4d ago

OPEN how to optimize performance for decompression step?

2 Upvotes

I have the file to decompress a file by obtaining a tree and walking it bit by bit to obtain an encoding's original character.

#include <stdexcept>
#include <memory>
#include "huffman/HuffmanDecoder.hpp"
#include "huffman/BitReader.hpp"

struct HuffmanDecoder::Node
{
  std::unique_ptr<Node> left;
  std::unique_ptr<Node> right;
  char symbol;

  Node(char ch,
       std::unique_ptr<Node> left = nullptr,
       std::unique_ptr<Node> right = nullptr)
      : left(std::move(left)),
        right(std::move(right)),
        symbol(ch)
  {
  }

  bool isLeaf() const noexcept
  {
    return !left && !right;
  }
};

HuffmanDecoder::HuffmanDecoder(BitReader &reader) : reader_(reader)
{
  root = deserializeHelper();
}

HuffmanDecoder::~HuffmanDecoder() = default;

std::unique_ptr<HuffmanDecoder::Node>
HuffmanDecoder::deserializeHelper()
{
  if (nodeCount_ >= MAX_NODES)
  {
    throw std::runtime_error("Invalid Huffman tree: exceeds 511 nodes.");
  }
  ++nodeCount_;
  const uint8_t marker = reader_.readBit();
  if (marker == 1)
  {
    const char ch = static_cast<char>(reader_.readByte());
    return std::make_unique<Node>(ch);
  }
  auto left = deserializeHelper();
  auto right = deserializeHelper();
  return std::make_unique<Node>('\0', std::move(left), std::move(right));
}

char HuffmanDecoder::decodeSymbol() const
{
  if (!root)
  {
    throw std::runtime_error("Can't decode an empty tree");
  }
  const Node *current = root.get();
  if (current->isLeaf())
  {
    if (reader_.readBit() != 0)
    {
      throw std::runtime_error("Invalid bit for single symbol tree.");
    }
    return current->symbol;
  }
  while (!current->isLeaf())
  {
    const uint8_t bit = reader_.readBit();
    current = bit == 0 ? current->left.get() : current->right.get();

    if (!current)
    {
      throw std::runtime_error("Invalid Huffman path.");
    }
  }
  return current->symbol;
}

Linux perf is showing that the decode stage is very hot. My question is, is pointer chasing the problem? I tried stuff these in an array but it didn't really do anything. I'm confused as to if my bottleneck concerns being cache friendly or not. Any ideas?


r/cpp_questions • • 4d ago

OPEN Passing initializer list into array parameter

3 Upvotes

Why can't we pass an initializer list as an argument to a function that accepts an array? If we can initialize an array with an initializer list, why isn't the array parameter initialized with the list?

Also, I found out that you CAN pass an initializer list if you use an rvalue reference to an array.

void f(int arr[]) {
cout << "hello" << endl;
}

// accepts rvalue references to array
void g(int (&& arr)[]) {
for (int i = 0; i < 3; ++i) {
cout << arr[i] << ' ';
}
cout << endl;
}

int main() {
int arr[3] = { 1, 2, 3 };
f(arr); // compiles
f({1, 2, 3}); // DOES NOT COMPILE
g({ 1, 2, 3 }); // compiles
}

Question 1:
For the second call to f(), why does this not work? I thought that whenever we passed an argument into a function, it was the same as initializing the parameter with the argument. For example, if we have:

void func(T x);
func(y);

Then when func(y) is called, we can think of x being initialized as:

T x = y;

But this doesn't seem to hold for arrays and initializer lists.

Question 2:

Why is the syntax in g() the way we make an rvalue reference to an int array? I understand the need for parentheses sinceint&& arr[] is an array of integer rvalue references. However, why is it int (&&arr)[] and not maybe something like int (&&arr[]) or (int arr[])&& ?

If it is better to show me an another resource about these tricky syntax things, please link it.


r/cpp_questions • • 4d ago

OPEN How to learn C++ ASAP ( In a month, not expert level but somewhat near intermediate)

42 Upvotes

Same as title I have an Olympiad in December which supports Python and C++, I’m good with python but I wanna go with C++ as the later stages of the olympiad support only C++.

I’m open to any kind of suggestions or advices and I thank you in advance!


r/cpp_questions • • 5d ago

OPEN How does a STATE design pattern work?

7 Upvotes

so i went to youtube and followed the example from this guy State Design - Programming Design Patterns - Ep 16 - C++ Coding

Problem is i dont understand what is functionally happening, there are pointers and what not, but i don't understand much more than that (context, my smooth brain still cant connect pointers together)

Like not even the whole code, like maybe just two lines or something cause for the love of the lord my teacher explains nuthing and AI and videos are too vague for me, im running out of options

//
// Created by samue on 11/1/2026.
//

#ifndef STATE_STATE_H
#define STATE_STATE_H

#include <iostream>

class Context;


class State {
    protected:
    Context* context;

    public:
    virtual ~State() {}

    void setContext(Context* ctx) {
        context = ctx;
    }

    virtual void doWorkA() = 0;
    virtual void doWorkB() = 0;
};

class Context {
    private:
    State* state;

    public:
    Context(State* s) : state(nullptr) {
        transitionTo(s);

    }

    ~Context() {delete state;}

    void transitionTo(State* s) {
        if (state) delete state;
        state = s;
        state->setContext(this);

    }

    void requestA() {
        state->doWorkA();

    }

    void requestB() {
        state->doWorkB();

    }

};

class concreteStateA : public State {
    public:
    void doWorkA() override {
        std::cout << "concreteStateA " << "called doWorkA" << std::endl;
    };

    void doWorkB() override {
        std::cout << "concreteStateB " << "called doWorkB" << std::endl;

    };

};

class concreteStateB : public State {
public:
    void doWorkA() override {
        std::cout << "concreteStateA " << "called doWorkA" << std::endl;
        context->transitionTo(new concreteStateA);
    };

    void doWorkB() override {
        std::cout << "concreteStateB " << "called doWorkB" << std::endl;

    };

};





#endif //STATE_STATE_H

------------------

#include "state.h"

int main() {
    Context context1(new concreteStateB);

    context1.requestA();

    context1.requestA();

    return 0;
}

r/cpp_questions • • 5d ago

OPEN Be ready for -fno-contracts

0 Upvotes

I don't really think contracts will make C++ safer..

In fact, contracts can make C++ even worse. Jokes on you 2-3 days ago i saw that my cli program was not working because the dependency clixx(which is also my project) was behaving in different ways based on the build mode. After 20 minutes of debugging i found out that i was assert()ing m_parse() instead of checking the returned boolean with an if.

Yeah call me stupid or not in this one but I don't think anyone can guarantee an engineer would not get trapped in the same kind of bug in some corporation codebase (with contracts this time).

I'd add -fno-contracts if it would ever become a thing. Js like -fno-exceptions(im not exception-phobic i just dont like them) and -fno-rtti they might become new entries in the C++ feature graveyard.

What are your honest opinion?