fork download
  1. #include <iostream>
  2. #include <map>
  3. #include <initializer_list>
  4. using namespace std;
  5.  
  6. class Test {
  7. std::map<const char*, void(*)()> m_ints;
  8. public:
  9. Test(std::initializer_list<decltype(m_ints)::value_type> init):
  10. m_ints(init)
  11. {}
  12. };
  13.  
  14. void testfunction(){
  15. cout << "This is a test function"<<endl;
  16. }
  17.  
  18. int main()
  19. {
  20. Test t = { {"hello", &testfunction} };
  21. return 0;
  22. }
Success #stdin #stdout 0s 4368KB
stdin
Standard input is empty
stdout
Standard output is empty