MCPcopy Create free account
hub / github.com/boostorg/hana / parse

Function parse

example/misc/nth.cpp:16–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
15template <std::size_t N>
16constexpr long long parse(const char (&arr)[N]) {
17 long long number = 0, base = 1;
18 for (std::size_t i = 0; i < N; ++i) {
19 number += to_int(arr[N - 1 - i]) * base;
20 base *= 10;
21 }
22 return number;
23}
24
25template <char ...c>
26struct pick {

Callers

nothing calls this directly

Calls 1

to_intFunction · 0.70

Tested by

no test coverage detected