src/static_fields.cpp
100.0% Lines (16/16)
100.0% List of functions (4/4)
100.0% Branches (2/2)
Functions (4)
Function
Calls
Lines
Branches
Blocks
boost::burl::static_fields::static_fields(char*, unsigned long)
:18
9x
100.0%
–
100.0%
boost::burl::static_fields::static_fields(boost::burl::static_fields&&)
:27
1x
100.0%
–
100.0%
boost::burl::static_fields::operator=(boost::burl::static_fields const&)
:35
3x
100.0%
–
100.0%
boost::burl::static_fields::operator=(boost::burl::fields_base const&)
:42
7x
100.0%
100.0%
100.0%
| Line | Branch | TLA | Hits | Source Code |
|---|---|---|---|---|
| 1 | // | |||
| 2 | // Copyright (c) 2021 Vinnie Falco ([email protected]) | |||
| 3 | // Copyright (c) 2026 Mohammad Nejati | |||
| 4 | // | |||
| 5 | // Distributed under the Boost Software License, Version 1.0. (See accompanying | |||
| 6 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |||
| 7 | // | |||
| 8 | // Official repository: https://github.com/cppalliance/burl | |||
| 9 | // | |||
| 10 | ||||
| 11 | #include <boost/burl/static_fields.hpp> | |||
| 12 | ||||
| 13 | namespace boost | |||
| 14 | { | |||
| 15 | namespace burl | |||
| 16 | { | |||
| 17 | ||||
| 18 | 9x | static_fields:: | ||
| 19 | static_fields( | |||
| 20 | char* storage, | |||
| 21 | 9x | std::size_t n) | ||
| 22 | 9x | : fields_base() | ||
| 23 | { | |||
| 24 | 9x | init_static_(storage, n); | ||
| 25 | 8x | } | ||
| 26 | ||||
| 27 | 1x | static_fields:: | ||
| 28 | 1x | static_fields(static_fields&& other) noexcept | ||
| 29 | 1x | : fields_base() | ||
| 30 | { | |||
| 31 | 1x | swap_(other); | ||
| 32 | 1x | } | ||
| 33 | ||||
| 34 | static_fields& | |||
| 35 | 3x | static_fields:: | ||
| 36 | operator=(static_fields const& other) | |||
| 37 | { | |||
| 38 | 3x | return *this = static_cast<fields_base const&>(other); | ||
| 39 | } | |||
| 40 | ||||
| 41 | static_fields& | |||
| 42 | 7x | static_fields:: | ||
| 43 | operator=(fields_base const& other) | |||
| 44 | { | |||
| 45 |
2/2✓ Branch 0 taken 6 times.
✓ Branch 1 taken 1 time.
|
7x | if(this != &other) | |
| 46 | 6x | assign_(other, 0); | ||
| 47 | 5x | return *this; | ||
| 48 | } | |||
| 49 | ||||
| 50 | } // namespace burl | |||
| 51 | } // namespace boost | |||
| 52 |