Ponca
eb7239a9c07e156fb1edc6faac7fe89e2b256bda
Point Cloud Analysis library
Loading...
Searching...
No Matches
typeutils.h
1
/*
2
This Source Code Form is subject to the terms of the Mozilla Public
3
License, v. 2.0. If a copy of the MPL was not distributed with this
4
file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
*/
6
#pragma once
7
8
namespace
Ponca
9
{
16
template
<
size_t
N>
17
struct
StringLiteral
18
{
19
char
value[N];
20
constexpr
StringLiteral(
const
char
(&str)[N]) { std::copy_n(str, N, value); }
21
};
22
32
inline
constexpr
bool
strequal
(
const
char
* a,
const
char
* b)
33
{
34
while
(*a && *b)
35
{
36
if
(*a != *b)
37
return
false
;
38
39
++a;
40
++b;
41
}
42
43
return
*a == *b;
44
}
45
}
// namespace Ponca
Ponca
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Definition
concepts.h:11
Ponca::strequal
constexpr bool strequal(const char *a, const char *b)
Constexpr version of string comparison.
Definition
typeutils.h:32
src
Ponca
src
Common
typeutils.h
Generated on
for Ponca by
1.15.0