Skip to content

Allow string_view as default value for ABSL_FLAG(std::string)#2058

Closed
DrishtiTripathi2230 wants to merge 3 commits into
abseil:masterfrom
DrishtiTripathi2230:fix-string-view-default-flag
Closed

Allow string_view as default value for ABSL_FLAG(std::string)#2058
DrishtiTripathi2230 wants to merge 3 commits into
abseil:masterfrom
DrishtiTripathi2230:fix-string-view-default-flag

Conversation

@DrishtiTripathi2230
Copy link
Copy Markdown
Contributor

Fixes #1540

Allow std::string_view to be used as default value for ABSL_FLAG(std::string, ...).

Changed InitDefaultValue template to accept any convertible type U,
so that string_view is implicitly converted to string when used as
a default value.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ABSL_FLAG(std::string) does not accept std::string_view as a default value

1 participant