MCPcopy Create free account
hub / github.com/NativeScript/android / emplace

Function emplace

test-app/runtime/src/main/cpp/ada/ada.h:3432–3440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3430 template <class... Args, detail::enable_if_t<std::is_nothrow_constructible<
3431 T, Args &&...>::value> * = nullptr>
3432 void emplace(Args &&...args) {
3433 if (has_value()) {
3434 val().~T();
3435 } else {
3436 err().~unexpected<E>();
3437 this->m_has_val = true;
3438 }
3439 ::new (valptr()) T(std::forward<Args>(args)...);
3440 }
3441
3442 template <class... Args, detail::enable_if_t<!std::is_nothrow_constructible<
3443 T, Args &&...>::value> * = nullptr>

Callers 2

emplace_hintMethod · 0.50
insertMethod · 0.50

Calls 1

has_valueFunction · 0.70

Tested by

no test coverage detected