2018-01-17 19:35:31 -08:00
|
|
|
#pragma once
|
|
|
|
|
2019-04-08 23:26:18 -07:00
|
|
|
#include <vcpkg/base/zstringview.h>
|
2018-01-17 19:35:31 -08:00
|
|
|
|
2020-07-11 21:07:51 -07:00
|
|
|
#include <string>
|
|
|
|
|
2018-01-17 19:35:31 -08:00
|
|
|
namespace vcpkg
|
|
|
|
{
|
2019-04-08 23:26:18 -07:00
|
|
|
struct StringLiteral : ZStringView
|
2018-01-17 19:35:31 -08:00
|
|
|
{
|
|
|
|
template<int N>
|
2019-04-08 23:26:18 -07:00
|
|
|
constexpr StringLiteral(const char (&str)[N]) : ZStringView(str)
|
2018-01-17 19:35:31 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-04-08 23:26:18 -07:00
|
|
|
operator std::string() const { return std::string(data(), size()); }
|
2018-01-17 19:35:31 -08:00
|
|
|
};
|
|
|
|
}
|