azerothcore / azerothcore/mod-premium-lib
Compile Error
- Dominant language
- C++
- Stars
- 4
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
azerothcore-wotlk/modules/mod-premium-lib/src/PremiumCommands.cpp:21:17: warning: 'ChatCommand' is deprecated: std::vector should be ChatCommandTable! (using namespace Acore::ChatCommands) [-Wdeprecated-declarations]
std::vector GetCommands() const override
^
/azerothcore-wotlk/src/server/game/Chat/ChatCommands/ChatCommand.h:261:21: note: 'ChatCommand' has been explicitly marked deprecated here
using ChatCommand [[deprecated("std::vector should be ChatCommandTable! (using namespace Acore::ChatCommands)")]] = Acore::ChatCommands::ChatCommandBuilder;
^
/azerothcore-wotlk/modules/mod-premium-lib/src/PremiumCommands.cpp:23:41: fatal error: no matching constructor for initialization of 'std::vector' (aka 'vector')
static std::vector characterCommandTable
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:522:7: note: candidate constructor not viable: cannot convert initializer list argument to 'std::vector::size_type' (aka 'unsigned long')
vector(size_type __n, const value_type& __value,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:585:7: note: candidate constructor not viable: cannot convert initializer list argument to 'std::vector'
vector(vector&& __rv, const allocator_type& __m, true_type) noexcept
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:589:7: note: candidate constructor not viable: cannot convert initializer list argument to 'std::vector'
vector(vector&& __rv, const allocator_type& __m, false_type)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:653:2: note: candidate template ignored: couldn't infer template argument '_InputIterator'
vector(_InputIterator __first, _InputIterator __last,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:510:7: note: candidate constructor not viable: requires at most 2 arguments, but 3 were provided
vector(size_type __n, const allocator_type& __a = allocator_type())
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:575:7: note: candidate constructor not viable: requires 2 arguments, but 3 were provided
vector(const vector& __x, const allocator_type& __a)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:607:7: note: candidate constructor not viable: requires 2 arguments, but 3 were provided
vector(vector&& __rv, const allocator_type& __m)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:625:7: note: candidate constructor not viable: requires at most 2 arguments, but 3 were provided
vector(initializer_list __l,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:497:7: note: candidate constructor not viable: requires single argument '__a', but 3 arguments were provided
vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:553:7: note: candidate constructor not viable: requires single argument '__x', but 3 arguments were provided
vector(const vector& __x)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:572:7: note: candidate constructor not viable: requires 1 argument, but 3 were provided
vector(vector&&) noexcept = default;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:487:7: note: candidate constructor not viable: requires 0 arguments, but 3 were provided
vector() = default;
^
1 warning and 1 error generated.
gmake[2]: *** [modules/CMakeFiles/modules.dir/build.make:734: modules/CMakeFiles/modules.dir/mod-premium-lib/src/PremiumCommands.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
Contributor guide
No contributing guide indexed for this repository
Research direction
The failure is in modules/mod-premium-lib/src/PremiumCommands.cpp at lines 21-23; read the ChatCommand definition and deprecation note in src/server/game/Chat/ChatCommands/ChatCommand.h first. Update the command-table usage so the module builds successfully, then rebuild the modules target to confirm the error is gone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100