Skip to content

New container: double ended string? #298

@denzor200

Description

@denzor200

By analogy with boost::container::devector, I think it would be useful to have a boost::container::destring.

One of possible use cases is to create complicated concatenation chains without memory allocations(just my opinion, not sure does it worth, not sure does anybody really want it):

boost::container::destring str = "Hello world";
str.reserve(str.size() + 2); // prepare to insert one element front and yet one back
const auto braced_str = "(" + std::move(str) + ")"; // no memory allocation at all

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions