From f4321a2b14eec1345c294432bee25af297adee65 Mon Sep 17 00:00:00 2001 From: payetvin <113102157+payetvin@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:14:50 +0100 Subject: [PATCH] Remove YUNI_STATIC_ASSERT (#1863) --- src/libs/antares/study/sets.hxx | 9 +++------ src/libs/antares/study/version.cpp | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/libs/antares/study/sets.hxx b/src/libs/antares/study/sets.hxx index 162919c0bc..9ab3847fdc 100644 --- a/src/libs/antares/study/sets.hxx +++ b/src/libs/antares/study/sets.hxx @@ -404,9 +404,8 @@ template template inline bool Sets::hasOutput(const StringT& s) const { - using namespace Yuni; // Assert, if a C* container can not be found at compile time - YUNI_STATIC_ASSERT(Traits::CString::valid, HasOutput_InvalidTypeForBuffer); + static_assert(Yuni::Traits::CString::valid); typename MapOptions::const_iterator i = pOptions.find(s); return (i != pOptions.end()) ? i->second.output : false; @@ -422,9 +421,8 @@ template template inline uint Sets::resultSize(const StringT& s) const { - using namespace Yuni; // Assert, if a C* container can not be found at compile time - YUNI_STATIC_ASSERT(Traits::CString::valid, HasOutput_InvalidTypeForBuffer); + static_assert(Yuni::Traits::CString::valid); typename MapOptions::const_iterator i = pOptions.find(s); return (i != pOptions.end()) ? i->second.resultSize : 0; @@ -434,9 +432,8 @@ template template inline typename Sets::IDType Sets::caption(const StringT& s) const { - using namespace Yuni; // Assert, if a C* container can not be found at compile time - YUNI_STATIC_ASSERT(Traits::CString::valid, HasOutput_InvalidTypeForBuffer); + static_assert(Yuni::Traits::CString::valid); typename MapOptions::const_iterator i = pOptions.find(s); return (i != pOptions.end()) ? i->second.caption : IDType(); diff --git a/src/libs/antares/study/version.cpp b/src/libs/antares/study/version.cpp index 5f388d45ae..d603c32034 100644 --- a/src/libs/antares/study/version.cpp +++ b/src/libs/antares/study/version.cpp @@ -41,8 +41,7 @@ enum versionFromCMake = (ANTARES_VERSION_HI * 100 + ANTARES_VERSION_LO * 10), }; -YUNI_STATIC_ASSERT((uint)versionFromCMake == (uint)Antares::Data::versionLatest, - DiscrepancyBetweenCMakeVersionAndAntaresVersion); +static_assert((uint)versionFromCMake == (uint)Antares::Data::versionLatest); namespace Antares::Data {