Safely using enable_shared_from_this
Obtaining a ‘shared_ptr’ from ‘this’ is possible using the ‘enable_shared_from_this’ class. It’s a feature that allows a class to reference itself within a smart pointer
Obtaining a ‘shared_ptr’ from ‘this’ is possible using the ‘enable_shared_from_this’ class. It’s a feature that allows a class to reference itself within a smart pointer
Smart pointers in C++ are nice, yet fraught with irregularities. One is the inability to create a proper clone function. This requires a feature called
How is an overloaded function compiled? It’s not something I truly considered prior to writing Leaf. My first implementation mimicked C++, at least how they
I previously contemplated elimination of the ternary conditional operator, but now I have a solution that retains and improves it. My biggest concern here is
I’m reconsidering the necessity of the conditional ternary operator in Leaf. I’m having troubles coming up with a comfortable, flexible, and unambiguous syntax. The traditional
A question recently asked why a ‘constexpr’ function in C++ may comprise only a return statement. It’s a good question. On quick glance the restriction
A language’s type hierarchy is formed with both linking and attributes. But what if a uniform hierarchy is not the correct way to represent a
I’m in the midst of reworking a significant aspect of the type system in Leaf. It’s a lot of work, and I’d like to avoid
C++11 introduced a perfect forwarding mechanism for template parameters. The key part is the ability for a template parameter to match any input without any
Does ‘return’ always cause a function to return? Surprisingly the answer is “no”. Indeed there are situations in which ‘break’ may not always break from
Signup to my mailing list to get notified of each article I publish.
Made with Elementor. Hosted with SiteGround. Domain from Netim.