Problem with variable arguments
You shouldn't add functions in namespace std. I forgot the exact rules, but the vast majority of the time you'll be in undefined-behavior land.
I didn't - I added it to the global namespace.
You shouldn't add functions in namespace std. I forgot the exact rules, but the vast majority of the time you'll be in undefined-behavior land.
I didn't - I added it to the global namespace.
Oh, I misread your code. Sorry about that.
Some programmers would have a heart attack if they saw my header file where I illegally forward declare many members of the standard library.
I don't know if I can enable C++14 in my compiler :S
This is my current compiler:
That's the same version I'm using (though a different build). Pass -std=c++1y instead of -std=c++11, and you'll gain access to most the C++14 stuff.
Some things aren't available, but alot is, including std::make_unique. There are later builds available, next time you decide to upgrade. I personally upgrade once or twice a year.
That's the same version I'm using (though a different build). Pass -std=c++1y instead of -std=c++11, and you'll gain access to most the C++14 stuff.
Some things aren't available, but alot is, including std::make_unique. There are later builds available, next time you decide to upgrade. I personally upgrade once or twice a year.
Ok thanks :) I'll try it later.
That's the same version I'm using (though a different build). Pass -std=c++1y instead of -std=c++11, and you'll gain access to most the C++14 stuff.
Why 'c++1y' instead of 'c++14'? I'm fairly certain the 4.9.2-generation of GCCs/MinGWs should support that (within the known limits). At least at home that works fine.
Why 'c++1y' instead of 'c++14'? I'm fairly certain the 4.9.2-generation of GCCs/MinGWs should support that (within the known limits). At least at home that works fine.
You're right; I'm wasn't sure what version "c++14" became the command-line parameter to use, so I just grabbed the commandline from my qmake file since I know it works for the version the OP is using. You're correct though, switching it to c++14 still compiled my project fine. I'll update the parameter in my codebase; or maybe I'll just jump to c++1z next time I update the compiler.