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
}
}
Post
Replies
Boosts
Views
Activity
Since you only allow text attachments (and no URLs),
I put an example project on my web site:
ran dy dot strausses dot net slash info slash be
(you changed the 1st 5 letters to stars till I added a space...)