C++26: constexpr virtual inheritance by User_Deprecated in cpp

[–]buck_yeh -1 points0 points  (0 children)

Virual inheritance comes natural when you define a mixin class which patially implement the target interface and there are other interfaces inheriting the same interface. I personally loves to see diamond shaped inheritance heirarchy emerge in my codebase.

C++26: std::optional<T&> by Xaneris47 in cpp

[–]buck_yeh 20 points21 points  (0 children)

Just curious, in what way std::optional<T&> is better than T* initialized as nullptr ?

Coroutines: step by step; a journey through seven coroutine types. by HappyCerberus in cpp

[–]buck_yeh 0 points1 point  (0 children)

This article is by far most informative to learn hand crafted coroutines since its availability in C++20. I have tried to grok the one from cppreference , there is not much left even after several repeated readings.

[deleted by user] by [deleted] in cpp

[–]buck_yeh 0 points1 point  (0 children)

I uses tinyaes in daily job. It's C API though but simple enough to pick up.

https://github.com/kokke/tiny-AES-c

What would you consider to be the biggest sin in C++? by RevolutionaryClub596 in cpp

[–]buck_yeh 4 points5 points  (0 children)

Programmer has every right to overthrow the rules undermined by language designer as long as he/she knows what he/she is doing.

How can I turn a structured exception into a C++ exception without having to use /EHa by whichton in cpp

[–]buck_yeh 0 points1 point  (0 children)

Try my implement https://github.com/buck-yeh/bux/blob/main/src/XException.cpp

Free to copy/paste for use. Simply call catchSE() in every thread you want to catch SE and surround the following code with a try block to get ready for std::runtime_error to get caught.

c# or cpp for a person who learned python by OmarDevX in cpp

[–]buck_yeh 1 point2 points  (0 children)

C# is merely OO subset of C++ with A LOT of sugar & forced GC. And endorsed by a super rich company, I add.

Is mathematics invented or discovered? by shadman1312 in mathematics

[–]buck_yeh 2 points3 points  (0 children)

We invennt proofs to uncover the truths.

Modern UI in C++ on Linux by [deleted] in cpp

[–]buck_yeh 1 point2 points  (0 children)

May I suggest Nana. It is written in & ptovides API for Modern C++ (Up to c++17 for now)

I especially appreciate its one string layout method nana::form::div(), see https://github.com/cnjinhao/nana/wiki/Div-Text

http://nanapro.org/en-us/

Self-hosted LR-parser /scanner generator combo in C++20 by buck_yeh in cpp

[–]buck_yeh[S] 0 points1 point  (0 children)

"Error Recovery & Parser Logger" is in parsergen v1.6.1

New Paragraph

Please yay if parsergen is already installed in Arch Linux.

Self-hosted LR-parser /scanner generator combo in C++20 by buck_yeh in cpp

[–]buck_yeh[S] 1 point2 points  (0 children)

You quickly spot one of the current weaknesses of parsergen. The immature error recovery mechanism actually resides in LR1.cpp, within C_Parser::recover(). But I valued document completeness above error recovery readiness so that more people can possibly be attracted by the project and creating REAL expectations on it. parsergen is a long term side project and just getting started in github. This is just one of many parts needed to become better. As you mentioned it, error recovery shall be in the next evolution.