Ticket #11333 (closed Feature Requests: fixed)

Opened 2 years ago

Last modified 2 months ago

boost::basic_string_ref should interop with boost::container::basic_string

Reported by: Tavian Barnes <tavianator@…> Owned by: igaztanaga
Milestone: To Be Determined Component: utility
Version: Boost 1.58.0 Severity: Problem
Keywords: Cc: Andrey.Semashev@…


There is a nice implicit conversion from std::basic_string to boost::basic_string_ref. It would be nice if the same thing worked for boost::container::basic_string.


Change History

comment:1 Changed 10 months ago by Tavian Barnes <tavianator@…>

Would be nice for the new boost::basic_string_view as well.

comment:2 Changed 4 months ago by andysem

  • Cc Andrey.Semashev@… added
  • Owner changed from no-maintainer to marshall

comment:3 Changed 4 months ago by andysem

  • Owner changed from marshall to igaztanaga

The C++17 solution to this is to add a conversion operator std::basic_string::operator std::basic_string_view(). I think, it would make sense to follow the same approach in Boost.Container. I'm adding Ion here by reassigning the ticket, let's see what he thinks.

comment:4 Changed 3 months ago by marshall

comment:5 Changed 2 months ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

Interoperability to string_view added in commit:

Thanks for the report and thanks Marshall for the initial proposal.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.