Yearly archives: 2017

29 posts

C++ : codecvt deprecated. Panic?

P0618RO:  “…The entire header <codecvt> (which does not contain the class codecvt!) is deprecated, as are the utilities wstring_convert and wbuffer_convert. These features are hard to use correctly, and there are doubts about whether they are even specified correctly. Users should use dedicated text-processing libraries instead…”

(update: for the comprehensive “all in one” solution please head here )

Therefore: C++17:codecvt is, officially, irrevocably, gone. For good. Deprecated.  And there is this highly suspicious: “Text-processing libraries” advice . Panic?  Please don’t.

Does this actually apply to you? My advice: “Stay cool calm and collected and all things will fall into place”. Read on. Continue reading

metacall()()()™ + project Euler

 

[Note: metacall base article]

I am currently in the stage of searching for simple but valid examples of metacall validity (aka: usefulness) as interfacing concept and programming idiom.

Leonhard Euler
Leonhard Euler

And, I think I have found one. metacall + project Euler. The mathematical nature of some computational problems make them a great fit for the functional paradigm. For those of you who don’t know, “Project Euler is a series of challenging mathematical/computer programming problems…” (ProjectEuler.net). I have concluded I could use the simple and interesting solution for a problem from “Project Euler” to show metacall in action.
Continue reading

Your API usability does matter. Use modern C++

Your API usability does matter indeed. It is not just some snazzy implementation behind, displayed on the GitHub to boast about. Think of your users, clients and customers. What  they see first and judge your quality for, is your API design.

By using standard modern C++  one can achieve more usable API than ever before.  And without any stunt programming whatsoever. Consider this. Continue reading

Stunt programming. Modern C++ is not about that.

Update: I have added page 4 “User Manual”

Update: I have expanded “Option 2” with a working solution. And hopefully  explained why is it very likely, still a stunt.

Stunt programming? Here is one definition. From C2 wiki

Stunt Programming

Doing things the hard or risky way because it is more exciting (and exciting is FUN…until you crash).

I could not agree more with this definition. I have also given practical example using C#, on the same subject sometimes ago.

Modern C++ provides a LOT of opportunity to engage and get one self lost in this kind of programming.

(This is one fairly long post with a lot of C++ code inside.  For newcomers to the modern C++, but not for the beginners. )
Continue reading