diff options
| author | ras0219 <533828+ras0219@users.noreply.github.com> | 2020-07-06 11:03:38 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-06 11:03:38 -0700 |
| commit | e82e56f27fe6a4953bb794bef702141e0146dd6d (patch) | |
| tree | 2d517819331fc529ac93b47ecf9645d7beda172f /toolsrc/include | |
| parent | c21893b4dc68430ebcf028ffdb190e586fc3d639 (diff) | |
| download | vcpkg-e82e56f27fe6a4953bb794bef702141e0146dd6d.tar.gz vcpkg-e82e56f27fe6a4953bb794bef702141e0146dd6d.zip | |
[vcpkg] Remove use of std::variant and std::visit to fix VS2015. (#12242)
Fixes #12220
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/stringview.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/toolsrc/include/vcpkg/base/stringview.h b/toolsrc/include/vcpkg/base/stringview.h index aee70d697..6a5503e1c 100644 --- a/toolsrc/include/vcpkg/base/stringview.h +++ b/toolsrc/include/vcpkg/base/stringview.h @@ -43,20 +43,7 @@ namespace vcpkg std::string to_string() const; void to_string(std::string& out) const; - constexpr StringView substr(size_t pos, size_t count = std::numeric_limits<size_t>::max()) const - { - if (pos > m_size) - { - return StringView(); - } - - if (count > m_size - pos) - { - return StringView(m_ptr + pos, m_size - pos); - } - - return StringView(m_ptr + pos, count); - } + StringView substr(size_t pos, size_t count = std::numeric_limits<size_t>::max()) const; constexpr char byte_at_index(size_t pos) const { return m_ptr[pos]; } |
