MCPcopy Create free account
hub / github.com/ceph/ceph / emplace

Function emplace

src/include/expected.hpp:1762–1770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1760 template <class... Args, detail::enable_if_t<std::is_nothrow_constructible<
1761 T, Args &&...>::value> * = nullptr>
1762 void emplace(Args &&...args) {
1763 if (has_value()) {
1764 val().~T();
1765 } else {
1766 err().~unexpected<E>();
1767 this->m_has_val = true;
1768 }
1769 ::new (valptr()) T(std::forward<Args>(args)...);
1770 }
1771
1772 template <class... Args, detail::enable_if_t<!std::is_nothrow_constructible<
1773 T, Args &&...>::value> * = nullptr>

Callers 8

add_lockMethod · 0.50
ConfFileMethod · 0.50
mini_flat_mapMethod · 0.50
mini_flat_mapClass · 0.50
insertMethod · 0.50
bitset_setMethod · 0.50
insertMethod · 0.50
constructMethod · 0.50

Calls 2

has_valueFunction · 0.85
errClass · 0.50

Tested by

no test coverage detected