mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-22 17:20:05 +00:00
25 lines
481 B
C++
25 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
|