Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
third_party
benchmark
src
benchmark/src/arraysize.h
Go to the documentation of this file.
1
#ifndef BENCHMARK_ARRAYSIZE_H_
2
#define BENCHMARK_ARRAYSIZE_H_
3
4
#include "
internal_macros.h
"
5
6
namespace
benchmark
{
7
namespace
internal
{
8
// The arraysize(arr) macro returns the # of elements in an array arr.
9
// The expression is a compile-time constant, and therefore can be
10
// used in defining new arrays, for example. If you use arraysize on
11
// a pointer by mistake, you will get a compile-time error.
12
//
13
14
// This template function declaration is used in defining arraysize.
15
// Note that the function doesn't need an implementation, as we only
16
// use its type.
17
template
<
typename
T,
size_t
N>
18
char (&
ArraySizeHelper
(
T
(&
array
)[
N
]))[
N
];
19
20
// That gcc wants both of these prototypes seems mysterious. VC, for
21
// its part, can't decide which to use (another mystery). Matching of
22
// template overloads: the final frontier.
23
#ifndef COMPILER_MSVC
24
template
<
typename
T,
size_t
N>
25
char (&
ArraySizeHelper
(
const
T
(&
array
)[
N
]))[
N
];
26
#endif
27
28
#define arraysize(array) (sizeof(::benchmark::internal::ArraySizeHelper(array)))
29
30
}
// end namespace internal
31
}
// end namespace benchmark
32
33
#endif // BENCHMARK_ARRAYSIZE_H_
benchmark
Definition:
bm_alarm.cc:55
T
#define T(upbtypeconst, upbtype, ctype, default_value)
array
Definition:
undname.c:101
internal_macros.h
N
#define N
Definition:
sync_test.cc:37
benchmark::internal::ArraySizeHelper
char(& ArraySizeHelper(T(&array)[N]))[N]
internal
Definition:
benchmark/test/output_test_helper.cc:20
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:34