Browse Source

Add a DefaultInit tag.

This one will overload the meaning of "default", so updating the docs
accordingly.
pull/518/head
Vladimír Vondruš 5 years ago
parent
commit
3cd1813bc2
  1. 2
      doc/changelog.dox
  2. 29
      src/Magnum/Tags.h

2
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},

29
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}

Loading…
Cancel
Save