I’m trying to check if an operator exists at compile time, if it doesn’t I just want it ignored, is there any way to do that?
example operator:
template <typename T>
QDataStream& operator<<(QDataStream& s, const QList<T>& l);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I ended up using a fallback namespace :
Also found the proper way to check for operators at compile time (although I’m going with the fallback namespace).
more or less based on this :
//edit changed has_stream_operators a bit.
//edit removed the link, apparently the site has some attack javascript.