4 ms·
Does this actually use classes and other features of C++? Scanning a few files on Github I see namespaces being used but not much else. Very impressive either
by mdellavo 10y ago
Does this actually use classes and other features of C++? Scanning a few files on Github I see namespaces being used but not much else.
Very impressive either way - I was just curious how C++ was leveraged.
- wichtounet 10y agoI'm using a few classes and some class hierarchy as well. I've reimplemented std::vector and std::string and a few other features from the STL and use them both in kernel space and user space (the STL is not standalone, need the glibc and I didn't want to port everything). I'm using quite some templates in the library part. I'm using auto from C++11 and a few constexpr functions. I have disabled exceptions and RTTI. I'm using RAII principle as much as possible (but this can be improved a lot still). I'm using references when I can remove pointers. On the other hand, a lot of code is clearly very close to C. When you're doing some low-level things, parsing memory structures, paging, ... there are not a lot of features from C++ than can help. Moreover, there is a lot of code that could profit from some refactorings:P