Yearly archives: 2019

22 posts

C++ Lambda Mixer

Lambdas are delivering good and quick and simple C++. But , contrary to Functional Programming aficionados, you still need good old structs or classes. Here is the simple solution, with which you can achieve:

  • mixing lambdas into structure at run-time
  • polymorphic behavior without inheritance.

Continue reading

C++ Convert any character sequence to any standard string

Four standard char types can be transformed to each other
Four standard char types can be transformed into each other. Caveat Emptor: If using C or C++ avoid char8_t.

[Update 2023-01-07] Author of this humble post has decided not to use C or C++ to do any char or text or string processing, using those two languages. It is just too much trouble for no obvious gains. No drama. Might use GO. Language made by two gentlemen who invented UTF8.

[Update 2021-09-05] Here is the link to the why’s and hows of Unicode, with a focus on Windows code. At last, managed to find the time.

[Update 2021-03-18] Code in here is updated and there is a link to the Godbolt working version too.

(Note: this is the second part of C++ : codecvt deprecated. Panic? ) Continue reading