-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Cpp/fix/#610
- Loading branch information
Showing
7 changed files
with
639 additions
and
60 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.