mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-14 14:05:13 +01: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
|