In file included from main.cpp:17:0:
factory.h:49:5: error: 'explisit' does not name a type; did you mean 'va_list'?
explisit Smth(const std::string &class_id) {
^~~~~~~~
va_list
factory.h: In function 'Object* my_new_smth_()':
factory.h:62:27: error: no matching function for call to 'Smth::Smth(const char [5])'
return new Smth("plug");
^
factory.h:47:7: note: candidate: Smth::Smth()
class Smth : public Object {
^~~~
factory.h:47:7: note: candidate expects 0 arguments, 1 provided
factory.h:47:7: note: candidate: Smth::Smth(const Smth&)
factory.h:47:7: note: no known conversion for argument 1 from 'const char [5]' to 'const Smth&'
factory.h:47:7: note: candidate: Smth::Smth(Smth&&)
factory.h:47:7: note: no known conversion for argument 1 from 'const char [5]' to 'Smth&&'
factory.h: In static member function 'static Object* Factory::Create(const string&)':
factory.h:76:41: error: no matching function for call to 'Smth::Smth(const string&)'
return new Smth(class_id);
^
factory.h:47:7: note: candidate: Smth::Smth()
class Smth : public Object {
^~~~
factory.h:47:7: note: candidate expects 0 arguments, 1 provided
factory.h:47:7: note: candidate: Smth::Smth(const Smth&)
factory.h:47:7: note: no known conversion for argument 1 from 'const string {aka const std::__cxx11::basic_string<char>}' to 'const Smth&'
factory.h:47:7: note: candidate: Smth::Smth(Smth&&)
factory.h:47:7: note: no known conversion for argument 1 from 'const string {aka const std::__cxx11::basic_string<char>}' to 'Smth&&'
main.cpp: At global scope:
main.cpp:27:7: error: redefinition of 'class Smth'
class Smth : public Object {
^~~~
In file included from main.cpp:17:0:
factory.h:47:7: note: previous definition of 'class Smth'
class Smth : public Object {
^~~~
main.cpp: In function 'Object* my_new_smth_()':
main.cpp:40:9: error: redefinition of 'Object* my_new_smth_()'
Object* my_new_smth_() {
^~~~~~~~~~~~
In file included from main.cpp:17:0:
factory.h:61:9: note: 'Object* my_new_smth_()' previously defined here
Object *my_new_smth_() {
^~~~~~~~~~~~
main.cpp:41:29: error: no matching function for call to 'Smth::Smth(std::__cxx11::string&)'
return new Smth(class_id);
^
In file included from main.cpp:17:0:
factory.h:47:7: note: candidate: Smth::Smth()
class Smth : public Object {
^~~~
factory.h:47:7: note: candidate expects 0 arguments, 1 provided
factory.h:47:7: note: candidate: Smth::Smth(const Smth&)
factory.h:47:7: note: no known conversion for argument 1 from 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to 'const Smth&'
factory.h:47:7: note: candidate: Smth::Smth(Smth&&)
factory.h:47:7: note: no known conversion for argument 1 from 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to 'Smth&&'
|