libs/capy/src/ex/recycling_memory_resource.cpp
100.0% Lines (3/3)
100.0% Functions (1/1)
75.0% Branches (3/4)
libs/capy/src/ex/recycling_memory_resource.cpp
| Line | Branch | Hits | Source Code |
|---|---|---|---|
| 1 | // | ||
| 2 | // Copyright (c) 2025 Vinnie Falco (vinnie dot falco at gmail dot com) | ||
| 3 | // | ||
| 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
| 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
| 6 | // | ||
| 7 | // Official repository: https://github.com/cppalliance/capy | ||
| 8 | // | ||
| 9 | |||
| 10 | #include <boost/capy/ex/recycling_memory_resource.hpp> | ||
| 11 | |||
| 12 | namespace boost { | ||
| 13 | namespace capy { | ||
| 14 | |||
| 15 | std::pmr::memory_resource* | ||
| 16 | 108 | get_recycling_memory_resource() noexcept | |
| 17 | { | ||
| 18 |
3/4✓ Branch 0 taken 31 times.
✓ Branch 1 taken 77 times.
✓ Branch 3 taken 31 times.
✗ Branch 4 not taken.
|
108 | static recycling_memory_resource instance; |
| 19 | 108 | return &instance; | |
| 20 | } | ||
| 21 | |||
| 22 | } // namespace capy | ||
| 23 | } // namespace boost | ||
| 24 |