| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#include "error.h" |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
namespace panda { namespace error { |
|
4
|
|
|
|
|
|
|
|
|
5
|
15
|
|
|
|
|
|
const NestedCategory& get_nested_categoty(const std::error_category& self, const NestedCategory* next) { |
|
6
|
15
|
100
|
|
|
|
|
static thread_local std::map, NestedCategory> cache; |
|
7
|
15
|
50
|
|
|
|
|
auto iter = cache.find({&self, next}); |
|
8
|
15
|
100
|
|
|
|
|
if (iter != cache.end()) { |
|
9
|
11
|
|
|
|
|
|
return iter->second; |
|
10
|
|
|
|
|
|
|
} else { |
|
11
|
4
|
50
|
|
|
|
|
return cache.emplace(std::piecewise_construct, |
|
12
|
4
|
|
|
|
|
|
std::forward_as_tuple(&self, next), |
|
13
|
19
|
|
|
|
|
|
std::forward_as_tuple(self, next)).first->second; |
|
14
|
|
|
|
|
|
|
} |
|
15
|
|
|
|
|
|
|
} |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
}} |