Skip to content

Commit

Permalink
Merge pull request #612 from j-cortial/cpp/fix/#610
Browse files Browse the repository at this point in the history
Cpp/fix/#610
  • Loading branch information
jeff-hykin authored Dec 10, 2022
2 parents 4f32098 + 5d9362c commit d86bfb8
Show file tree
Hide file tree
Showing 7 changed files with 639 additions and 60 deletions.
2 changes: 1 addition & 1 deletion autogenerated/cpp.embedded.macro.tmLanguage.json

Large diffs are not rendered by default.

124 changes: 71 additions & 53 deletions autogenerated/cpp.tmLanguage.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions autogenerated/cpp_scopes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ keyword.other.namespace.directive.cpp
keyword.other.operator.overload.cpp
keyword.other.parameter.direction.$0.cpp
keyword.other.static_assert.cpp
keyword.other.suffix.literal.user-defined.character.cpp
keyword.other.suffix.literal.user-defined.reserved.character.cpp
keyword.other.suffix.literal.user-defined.reserved.string.cpp
keyword.other.suffix.literal.user-defined.string.cpp
keyword.other.typedef.cpp
keyword.other.typename.cpp
keyword.other.unit.binary.cpp
Expand Down
25 changes: 25 additions & 0 deletions language_examples/#610.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include <string>
#include <string_view>

using namespace std::literals::string_view_literals;
using namespace std::literals::string_literals;

const auto view = "Hello"sv;
const auto owned = "Hello"s;


template <typename T>
struct Wrapper {
T content;
};

static Wrapper<std::wstring> operator""_wrap(const wchar_t* s, std::size_t n) {
return {{s, n}};
}
const auto wide_string = L"ws"_wrap;
const auto raw_wide_string = LR"--(rws)--"_wrap;

static Wrapper<char> operator""_wrap(char c) {
return {c};
}
const auto character = 'c'_wrap;
Loading

0 comments on commit d86bfb8

Please sign in to comment.