diff --git a/doc/changelog.dox b/doc/changelog.dox index f6b54981e..55de0d867 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -41,6 +41,8 @@ See also: @subsection changelog-latest-new New features - New @ref NoAllocate constructor tag, to be used by the @ref Vk library +- New @ref DefaultInit constructor tag, simply an alias to the existing + @ref Corrade::DefaultInit tag - New @ref PixelFormat::Depth16Unorm, @relativeref{PixelFormat,Depth24Unorm}, @relativeref{PixelFormat,Depth32F}, @relativeref{PixelFormat,Stencil8UI}, @relativeref{PixelFormat,Depth16UnormStencil8UI}, diff --git a/src/Magnum/Tags.h b/src/Magnum/Tags.h index 8c86a563d..ea413e3c0 100644 --- a/src/Magnum/Tags.h +++ b/src/Magnum/Tags.h @@ -35,6 +35,21 @@ namespace Magnum { +/** +@brief Default initialization tag type +@m_since_latest + +Used to distinguish construction with default initialization. The actual +meaning of "default" may vary, see documentation of a particular API using this +tag for a detailed behavior description. +@see @ref DefaultInit +*/ +#ifdef DOXYGEN_GENERATING_OUTPUT +typedef Corrade::DefaultInitT DefaultInitT; +#else +using Corrade::DefaultInitT; +#endif + /** @brief No initialization tag type @m_since{2020,06} @@ -76,6 +91,20 @@ struct NoAllocateT { #endif }; +/** +@brief Default initialization tag +@m_since_latest + +Use for construction with default initialization. The actual meaning of +"default" may vary, see documentation of a particular API using this tag for +a detailed behavior description. +*/ +#ifdef DOXYGEN_GENERATING_OUTPUT +constexpr DefaultInitT DefaultInit{}; +#else +using Corrade::DefaultInit; +#endif + /** @brief No initialization tag @m_since{2020,06}