| 76 | using namespace __refstring_imp; |
| 77 | |
| 78 | inline __libcpp_refstring::__libcpp_refstring(const char* msg) { |
| 79 | std::size_t len = strlen(msg); |
| 80 | _Rep_base* rep = static_cast<_Rep_base*>(::operator new(sizeof(*rep) + len + 1)); |
| 81 | rep->len = len; |
| 82 | rep->cap = len; |
| 83 | rep->count = 0; |
| 84 | char* data = data_from_rep(rep); |
| 85 | std::memcpy(data, msg, len + 1); |
| 86 | __imp_ = data; |
| 87 | } |
| 88 | |
| 89 | inline __libcpp_refstring::__libcpp_refstring(const __libcpp_refstring& s) noexcept : __imp_(s.__imp_) { |
| 90 | if (__uses_refcount()) |
nothing calls this directly
no test coverage detected