From 4efcc78222d1f6c3b865257144562ba9bfac6b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 16 Oct 2020 16:09:42 +0200 Subject: [PATCH] Wait, why the heck do I not use the NoCreate tag from Corrade? It's been there since 2018. WTF. --- src/Magnum/Tags.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/Magnum/Tags.h b/src/Magnum/Tags.h index 16f18864e..22e506ad3 100644 --- a/src/Magnum/Tags.h +++ b/src/Magnum/Tags.h @@ -51,13 +51,7 @@ Used to distinguish construction without creating the underlying OpenGL / Vulkan / ... object. @see @ref NoCreate */ -/* Explicit constructor to avoid ambiguous calls when using {} */ -struct NoCreateT { - #ifndef DOXYGEN_GENERATING_OUTPUT - struct Init{}; - constexpr explicit NoCreateT(Init) {} - #endif -}; +typedef Corrade::Containers::NoCreateT NoCreateT; /** @brief No initialization tag @@ -66,7 +60,6 @@ struct NoCreateT { Use for construction with no initialization at all. */ #ifdef DOXYGEN_GENERATING_OUTPUT -/* Explicit constructor to avoid ambiguous calls when using {} */ constexpr NoInitT NoInit{}; #else using Corrade::Containers::NoInit; @@ -81,7 +74,11 @@ object. Note that calling anything on objects created this way is not defined delayed object creation with safety checks (however with some extra memory overhead), wrap the objects in an @ref Corrade::Containers::Optional. */ -constexpr NoCreateT NoCreate{NoCreateT::Init{}}; +#ifdef DOXYGEN_GENERATING_OUTPUT +constexpr NoCreateT NoCreate{}; +#else +using Corrade::Containers::NoCreate; +#endif }