mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/Commands: Exclude ambigious cast operator overloads from command Variant
Closes #25618
This commit is contained in:
@@ -244,7 +244,8 @@ namespace Trinity::ChatCommands
|
||||
namespace Trinity::Impl
|
||||
{
|
||||
template <typename T>
|
||||
struct CastToVisitor {
|
||||
struct CastToVisitor
|
||||
{
|
||||
template <typename U>
|
||||
T operator()(U const& v) const { return v; }
|
||||
};
|
||||
@@ -273,7 +274,7 @@ namespace Trinity::ChatCommands
|
||||
}
|
||||
|
||||
template<bool C = have_operators>
|
||||
operator std::enable_if_t<C && std::is_convertible<first_type, size_t>::value, size_t>() const
|
||||
operator std::enable_if_t<C && !std::is_same_v<first_type, size_t> && std::is_convertible_v<first_type, size_t>, size_t>() const
|
||||
{
|
||||
return operator*();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user