
"Jonathan Turkanis" <technews@kangaroologic.com> writes:
David Abrahams wrote:
David Abrahams <dave@boost-consulting.com> writes:
Or we could arrange to write:
#if BOOST_WORKAROUND(BOOST_GCC,< 3,2,3)
Nobody likes that one?
What about:
#if BOOST_WORKAROUND(GCC,< 3,2,3)
Pretty succinct, I think.
Are you sure it's legal to take "< 3" and paste on the remaining characters, e.g., "0404"? My knowledge of the preprocesor is pretty limited, but this sounds like something Paul M. told me was undefined.
No, I'm not sure. I believe you if you tell me it's undefined. We might need another comma. #if BOOST_WORKAROUND(GCC, <, 3,2,3)
I'm not sure about getting BOOST_TESTED_AT to work here.
#if BOOST_WORKAROUND(GCC, BOOST_TESTED_AT 3,2,3)
would be nice syntax, but I'm just not sure how workable it is. We may end up with
#if BOOST_WORKAROUND_TESTED_AT(GCC, 3,2,3)
which is actually pretty nice and requires fewer fancy tricks to implement.
You could also do
BOOST_WORKADOUND(GCC, LESS(3,2,3)) BOOST_WORKADOUND(GCC, LESS_EQ(3,2,3)) BOOST_WORKADOUND(GCC, TESTED_AT(3,2,3)) ...
Ick; why use a name to stand in for the operator when we can use the operator directly? -- Dave Abrahams Boost Consulting www.boost-consulting.com