Post

Replies

Boosts

Views

Activity

Reply to In XCode clang 11 I get: No template named 'initializer_list' in namespace 'std'
If I add the line: #include <initializerlist> XCode seems to accept it. If I jump to it, it finds it, in the namespace std But I STILL get the error... Below are my .h file, followed by a .c file. On both of the "set" lines which use std::initializerlist, I see the error: No template named 'initializerlist' in namespace 'std'_ #ifndef BOGUS_H #define BOGUS_H #include <initializer_list> #include <string> namespace STUPID {   class Bogus {   public:     Bogus() = default;     Bogus(const std::string& filename);     Bogus(const int argc, char* argv[]);     void set(const std::string& key, const std::initializer_list<std::string> list);   }; } #endif #include "Bogus.h" namespace STUPID {   Bogus::Bogus(const std::string& filename) {   }   Bogus::Bogus(const int argc, char* argv[]) {   }   void Bogus::set(const std::string& key, const std::initializer_list<std::string> list) {     // do nothing   } }
Aug ’20