Opened 22 months ago

Last modified 14 months ago

#12906 new Feature Requests

Add support for string_view

Reported by: Andrey Semashev Owned by: Joel de Guzman
Milestone: To Be Determined Component: spirit
Version: Boost 1.63.0 Severity: Problem
Keywords: spirit qi string_view Cc:


Please, add native support for attributes of type boost::string_view (and possibly std::string_view) to Boost.Spirit.Qi. I think, the best way to do this is to add a new directive, as_string_view (and as_wstring_view) which could be used similarly to as_string (as_wstring) but produce a boost::string_view (boost::wstring_view) value instead of std::string (std::wstring). Obviously, the directive would only be usable if the character iterator type is a pointer, but that is likely the most typical case anyway.

Change History (1)

comment:1 Changed 14 months ago by Andrey Semashev

Now that C++17 is finalized, support for std::string_view is also desired.

Note: See TracTickets for help on using tickets.