Skip to content

Brokenness for custom string literals #28

@Muzer

Description

@Muzer

I just had the following code:

#include <string>
#include <vector>

int main()
{
  using namespace std::string_literals;
 
  std::vector<std::string> foo{"foo"s, "bar"s};
}

...and cppinsights gave me the following output:

#include <string>
#include <vector>

int main()
{
  using namespace std::string_literals;
 
  std::vector<std::string> foo{ std::initializer_list<std::basic_string<char> >{ std::operator""s("foo", 3ul), std::operator""s(std::operator""s("foo", 3ul) 3std::operator""s("bar", 3ul)};
}

Note especially the 3std.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions