Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for C++11 #5

Open
eyalroz opened this issue Jun 18, 2021 · 5 comments
Open

Support for C++11 #5

eyalroz opened this issue Jun 18, 2021 · 5 comments

Comments

@eyalroz
Copy link

eyalroz commented Jun 18, 2021

It would be nice if you could make this class C++11-compatible. Many of us are stuck using older versions of the language standard...

Obviously, this will mean some constexpr members may need to become CONSTEXPR_SINCE_CPP14 or CONSTEXPR_SINCE_CPP17; and you may need to drop std::array which is pre-constexpr'ed in C++11. But it's still worth it IMHO :-) ... a bit of preprocessor magic can make it happen.

@unterumarmung
Copy link
Owner

unterumarmung commented Jul 1, 2021

It's so nice to see that someone is interested in the library!
The main reason I chose C++17 as the base standard was if constexpr because I didn't want to write all the std::enable_if boilerplate. Though now it seems it can be replaced with a simple if in the older standards with some kind of a macro or even removed.
And, well, the main purpose of the library is to pass strings as class non-types template parameters (which reminds me that I should update the FIXSTR_CPP20_CNTTP_PRESENT macro.. and the README.md)
I will consider adding support for the older standards, though I wouldn't mind external help :)
Thank you for the feedback!

@unterumarmung
Copy link
Owner

Well, I noticed a pitfall I didn't see yesterday, the internal implementation of most member functions depends on the std::string_view.
I don't think that implementing them all by myself is a good idea, neither I don't want to add dependencies on other libraries that implement a string_view.
So, @eyalroz, I don't know about lowering C++ support for the library is even possible.

@DBJDBJ
Copy link

DBJDBJ commented Aug 11, 2021

@unterumarmung
Copy link
Owner

@DBJDBJ well, code quality isn't great.. commit messages aren't either..
The intent of the library isn't clear and definitely differs from this one

@DBJDBJ
Copy link

DBJDBJ commented Aug 16, 2021

Well, I should have said what I have written at the top of the readme a minute ago.

Before I might commit some more time I would like to know what are the requirements @eyalroz has?

How should "fixed string" behave?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants