Potential fix for C++20 std::set::* ambiguity

(until C++20) bool empty() const noexcept;
(since C++20) [[nodiscard]] bool empty() const noexcept;
This commit is contained in:
Robin Gareus 2022-10-19 16:06:47 +02:00
parent 22829e96b1
commit 9914732004
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -1899,11 +1899,12 @@ public:
Class<std::set<T> > beginStdSet (char const* name)
{
typedef std::set<T> LT;
typedef typename LT::size_type T_SIZE;
return beginClass<LT> (name)
.addVoidConstructor ()
.addFunction ("clear", (void (LT::*)())&LT::clear)
.addFunction ("empty", &LT::empty)
.addFunction ("size", &LT::size)
.addFunction ("empty", (bool (LT::*)()const)&LT::empty)
.addFunction ("size", (T_SIZE (LT::*)()const)&LT::size)
#if 0 // needs work for AutomationTypeSet (T is-a enum not a class instance)
.addExtCFunction ("insert", &CFunc::setInsert<T, LT>)
#endif