Skip to content

zstring family require empty template parameter list for use #992

Description

@asdasdasdasdasdf

Based on the cpp core guidelines I expect to be able to write code like this
int length(zstring p);
but with this gsl implementation the code must look like this (at least on my compiler)
int length(zstring<> p);

I infer from the unit tests that this problem is not specific to me or my compiler. See for example:

czstring<> str = name.assume_z();

Not sure if this is a problem with the core guidelines or the gsl implementation but based on #770 it seems like the type alias shouldn't be templated.

zstring<> is only marginally worse than zstring but the time wasted figuring out why the example code wouldn't compile in practice is my primary concern.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions