on my mac, Xcode 9.2
I’m having lot of problems just recompiling my DSP base classes
without including any plugin
all the “std::string” declared inline are conflicting the rack::string (declared in string.hpp)
I have hundred of errors and the compilers says
in file included blablabla.cpp:32:
Candidate found by name lookup is 'std::__1::string'
Candidate found by name lookup is 'rack::string'
forced everywhere in my code the use of
Are you saying you have
using namespace std; or
using std::string; in your code? If so, then don’t do that.
yes, I was forced to use std::string
for example here
size_t prev = 0, pos = 0;
pos = str.find(delim, prev);
if (pos == std::string::npos) pos = str.length();
std::string token = str.substr(prev, pos-prev);
if (!token.empty()) tokens.push_back(token);
prev = pos + delim.length();
while (pos < str.length() && prev < str.length());
happened in all the places I had inlined
That’s the best option. Another option is to remove
using namespace rack;, but using
std::string is better C++ and far easier, and it won’t break when things move subnamespace in
A small note: “inlined” is not the correct term there.
correct: more "function in .h files… "