-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Avoiding infinite recursion with path_view #32
Comments
Here's a real-world example of this problem with |
AFAICS the current llfio/include/llfio/v2.0/path_view.hpp Line 125 in 3ee2dce
|
May I post your example to WG21 mailing reflector, to gain feedback on what is best to do with Note that there is no iterator support in the implementation because I had to go get feedback from SG16 Unicode on how best to do it. But I'm literally writing the new |
Sure. Another interesting data point is that from my Twitter poll, > 40% of people think that the example will work (print something), which is worrying. |
I would agree with them, it should work. While I have you as the author of {fmt}, can I persuade you to add support for raw gather buffer formatting to {fmt}? Then one can do cool stuff like:
Here I appreciate your |
Given the lack of useful feedback from WG21 mailing reflector, I've gone ahead and implemented your proposed |
I added your suggestion as an issue (fmtlib/fmt#1271) and will look into it.
Awesome, thanks! |
I've stumbled upon an interesting problem when working with
std::filesystem::path
. Consider the following example (https://godbolt.org/z/wDoxgT):Running it gives stack overflow because a single-element path is a range that contains itself as an element which causes infinite recursion. Unfortunately we cannot solve this problem in
std::filesystem::path
but would it be possible forpath_view
to do better, for example, by splittingpath_view
into two types such aspath_view
andpath_view_component
with the latter having all features of the former but not being a range?The text was updated successfully, but these errors were encountered: