
7 Oct
2008
7 Oct
'08
6:52 a.m.
Daniel Walker a écrit :
Yeah, that's kind of what I was getting at by a compile time eval or is_compilable. But those are misnomers. You're not checking validity for whole blocks or statements, just single expressions with a given type. But yeah, you could wrap the general boilerplate in a preprocessor metafunction and maybe call it something like BOOST_HAS_EXPRESSION. <snip> For platforms with concept language support, you would use CRFINAE instead of expression SFINAE on the two test() functions. At least, this is the general idea. I assume something like this would work...
I use this kind of code in a large number of code of my own and already have some proper macro. Mayeb i can upload my files somewhere so we can check ?