std::swap won't compile?
Solved
Qt Creator and other tools
-
on Windows
VS 2017 with MSVC2015 libs
using Creator 4.3.1i realize this probably isn't a Qt thing, more of a MS thing. here's my code:
#include <QCoreApplication> #include <algorithm> #include <memory> #include <utility> int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); int a=1, b=2; std::swap<int>(a, b); qDebug("a: %d, b: %d\n", a, b); return app.exec(); }
same code works on mac.
on windows, i get these errors: -
OMG is it that easy? where's the "d'oh!" emoji?
-
OMG is it that easy? where's the "d'oh!" emoji?