Skip to content

Commit

Permalink
Remove YUNI_STATIC_ASSERT (#1863)
Browse files Browse the repository at this point in the history
  • Loading branch information
payetvin authored Jan 4, 2024
1 parent 2aca866 commit f4321a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 3 additions & 6 deletions src/libs/antares/study/sets.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,8 @@ template<class T>
template<class StringT>
inline bool Sets<T>::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<StringT>::valid, HasOutput_InvalidTypeForBuffer);
static_assert(Yuni::Traits::CString<StringT>::valid);

typename MapOptions::const_iterator i = pOptions.find(s);
return (i != pOptions.end()) ? i->second.output : false;
Expand All @@ -422,9 +421,8 @@ template<class T>
template<class StringT>
inline uint Sets<T>::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<StringT>::valid, HasOutput_InvalidTypeForBuffer);
static_assert(Yuni::Traits::CString<StringT>::valid);

typename MapOptions::const_iterator i = pOptions.find(s);
return (i != pOptions.end()) ? i->second.resultSize : 0;
Expand All @@ -434,9 +432,8 @@ template<class T>
template<class StringT>
inline typename Sets<T>::IDType Sets<T>::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<StringT>::valid, HasOutput_InvalidTypeForBuffer);
static_assert(Yuni::Traits::CString<StringT>::valid);

typename MapOptions::const_iterator i = pOptions.find(s);
return (i != pOptions.end()) ? i->second.caption : IDType();
Expand Down
3 changes: 1 addition & 2 deletions src/libs/antares/study/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit f4321a2

Please sign in to comment.