Replies: 2 comments 1 reply
-
I'm in favor of this, especially now that we've moved to C++17 starting with 1.13. Probably not everywhere, but in places where it really makes sense. |
Beta Was this translation helpful? Give feedback.
0 replies
-
#4332 @teksturi you can work with @matejk on this for 1.14.0 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
We use Poco and are quite happy with it. However, we have already converted our entire internal codebase to use std::string_views. In many places, we now need to convert string_views to strings, as Poco only accepts the latter. These are the same places where we previously needed to create new strings, so it's not a catastrophic issue.
I'm still interested in whether we could support string_views in Poco and would like to know if this is something you would consider. I'm happy to start working on this, but first, we need a plan to determine if this will move forward. I understand that the minimum version Poco supports is C++17. However, there are still some places in the CMake files where C++14 is checked, but I wonder if that's just an oversight?
My proposal for proceeding with this is to start by converting to std::string_views in internal classes and source files. This should not affect external users at all. After that, we should decide whether to make a breaking change at some point and switch to using only string_views. Alternatively, we could take an intermediate step where we make this a compiler option. I've created a concept on Godbolt 1. We could get away of lot of things which currently use string iterators. These could in many places made just with string_views.
This is just an initial post on this subject. I have also done some prototyping with real code. If necessary, I can make a PR for a small portion, and maybe it would be easier to discuss it there.
Beta Was this translation helpful? Give feedback.
All reactions