static_string icon indicating copy to clipboard operation
static_string copied to clipboard

#ifdef-choose between the C++11 and the C++14 versions

Open eyalroz opened this issue 8 years ago • 2 comments

In the motivating blog post, you present both a C++14 and a C++11 version of some of the code (e.g. construction of an array string from two string literals) - but I don't see #ifdefs for that in the code. Would you mind adding those in, to make this a C++11/C++14 utility?

eyalroz avatar Sep 13 '17 22:09 eyalroz

I will consider doing it. Note that the library in the current shape also works with C++14.

akrzemi1 avatar Sep 14 '17 06:09 akrzemi1

Hello, I would like to ask you, if you still consider to do it?

Second, I mentioned that deducing the size of a string_literal from initializer is impossible in C++11. The situation will be different in C++17. I can define a deduction guide:

It would be really great if there could be some ifdef or branches that show how things could be simplified using C++14, C++17 or C++20 features. I agree the C++11 version could be used for all future versions, too. But it would be great for me and other to get a deeper insight (also in the new C++ feature that "simplifies" coding).

maggu2810 avatar Dec 12 '21 20:12 maggu2810