Skip to content

Feature: Universal References for Range-Producing Functions #274

@ashvardanian

Description

@ashvardanian

Describe what you are looking for

We currently accept const & arguments in the free-standing range-producing functions like the find_all and rsplit_characters in stringzilla.hpp. That's find for sz::string_view arguments, but will produce a copy for memory-owning sz::string instances.

It would be great to enable perfect-forwarding, but we can't properly implement it without a ton of SFINAE coming from <type_traits> header, limiting what we can do for SZ_AVOID_STL builds. In the v5, upgrading to C++ 20 as a baseline, we may be able to implement this more nicely with concepts.

Can you contribute to the implementation?

  • I can contribute

Is your feature request specific to a certain interface?

C++ bindings

Contact Details

No response

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions