24 lines
481 B
C++
24 lines
481 B
C++
// Copyright 2022 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <algorithm>
|
|
#include <cstddef>
|
|
|
|
namespace Common {
|
|
|
|
template <size_t N>
|
|
struct StringLiteral {
|
|
constexpr StringLiteral(const char (&str)[N]) {
|
|
std::copy_n(str, N, value);
|
|
}
|
|
|
|
static constexpr std::size_t strlen = N - 1;
|
|
static constexpr std::size_t size = N;
|
|
|
|
char value[N];
|
|
};
|
|
|
|
} // namespace Common
|