
Edward Diener wrote:
Is there any way to test at compile time, using a Boost construct, that a particular operator is not allowable for a given type, other than simply compile the code and have the compiler generate an error message when trying to use an operator on an object of that type ?
I am writing some tests for an MPL library on which I am working where I want to make sure that a given operator for my template class instantiation object will fail to compile, but I would like to do this in such a way that I can generate a compile time message for the failure rather than an actual compiler error. I suspect this is not possible but I thought I would ask anyway. Frederic Bron wrote an extensive list of traits meta-function for that. It was in the sandbox but I don't remember if it's in trunk atm.
Here's the link to the initial topic with a proper idea of implementation: http://article.gmane.org/gmane.comp.lib.boost.user/29170