Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Error storing instance of member function template -- SIMPLIFIED

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 0.14 sec, absolute service time: 0,21 sec 
edit mode |  history
Error(s):
source_file.cpp: In constructor ‘Foo::Foo()’:
source_file.cpp:15:35: error: no matches converting function ‘initialize’ to type ‘Foo::Initializer {aka void (class Foo::*)()}’
   Initializer initializer = &Foo::initialize<Foo, Foo::Function>; // NOT OK
                                   ^
source_file.cpp:9:7: note: candidate is: template<class T, void (T::* F1)(unsigned int)> void Foo::initialize()
  void initialize()
       ^
source_file.cpp:15:15: warning: unused variable ‘initializer’ [-Wunused-variable]
   Initializer initializer = &Foo::initialize<Foo, Foo::Function>; // NOT OK
               ^

        

    
                
λ
.NET NoSQL database for rapid development