Skip to content

[C++] Fix ambiguous ANTLRInputStream constructor overload - #3394

Merged
parrt merged 1 commit into
antlr:masterfrom
jcking:cpp-string-view
Dec 6, 2021
Merged

parrt merged 1 commit into
antlr:masterfrom
jcking:cpp-string-view

Conversation

@jcking

@jcking jcking commented Dec 6, 2021

Copy link
Copy Markdown
Collaborator

Not sure when this was added, but std::string is implicitly convertible to std::string_view. So this can cause compilation errors as the compiler does not know which one to select.

@jcking

jcking commented Dec 6, 2021

Copy link
Copy Markdown
Collaborator Author

@parrt Compilation fix. std::string is implicitly convertible to std::string_view. So the current code causes the compiler to be confused when using something like a string literal.

@parrt parrt added this to the 4.9.4 milestone Dec 6, 2021
@parrt
parrt merged commit 261769f into antlr:master Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants