What differences, if any, between C++03 and C++11 can be detected at run-time?

Core Language Accessing an enumerator using ::: template<int> struct int_ { }; template<typename T> bool isCpp0xImpl(int_<T::X>*) { return true; } template<typename T> bool isCpp0xImpl(…) { return false; } enum A { X }; bool isCpp0x() { return isCpp0xImpl<A>(0); } You can also abuse the new keywords struct a { }; struct b { a a1, … Read more

Detecting programming language from a snippet [closed]

I think that the method used in spam filters would work very well. You split the snippet into words. Then you compare the occurences of these words with known snippets, and compute the probability that this snippet is written in language X for every language you’re interested in. http://en.wikipedia.org/wiki/Bayesian_spam_filtering If you have the basic mechanism … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)