#ifndef ARANGODB_BASICS_TRYEMPLACEHELPER_H #define ARANGODB_BASICS_TRYEMPLACEHELPER_H 1 #include #include namespace arangodb { template struct lazyConstruct { using type = std::invoke_result_t; constexpr lazyConstruct(Lambda&& factory) : factory_(std::move(factory)) {} constexpr operator type() const noexcept(std::is_nothrow_invocable_v) { return factory_(); } Lambda factory_; }; } #endif