diff --git a/src/mongo/util/decoration_registry.h b/src/mongo/util/decoration_registry.h index dc1674339e4..3f31ed792a0 100644 --- a/src/mongo/util/decoration_registry.h +++ b/src/mongo/util/decoration_registry.h @@ -62,10 +62,11 @@ namespace mongo { static_assert(std::is_nothrow_destructible::value, "Decorations must be nothrow destructible"); #endif - return { std::move(declareDecoration(sizeof(T), - std::alignment_of::value, - &constructAt, - &destructAt)) }; + return DecorationContainer::DecorationDescriptorWithType( + std::move(declareDecoration(sizeof(T), + std::alignment_of::value, + &constructAt, + &destructAt))); } size_t getDecorationBufferSizeBytes() const { return _totalSizeBytes; }