From: Jeroen H. <vex...@gm...> - 2010-01-20 21:50:17
|
Hi, On Wed, Jan 20, 2010 at 22:37, Dean Michael Berris <mik...@gm...> wrote: > On Thu, Jan 21, 2010 at 5:17 AM, Glyn Matthews <gly...@gm...> wrote: >> >> 2010/1/20 Dean Michael Berris <mik...@gm...> >>> >>> On Thu, Jan 21, 2010 at 5:01 AM, Glyn Matthews <gly...@gm...> >>> wrote: >>> > >>> > 2010/1/20 Nelson, Erik - 2 <eri...@ba...> >>> >> >>> >> After I fix that, the next error I get is: >>> >> 1>c:\work\boost\boost/network/uri/http/detail/parse_specific.hpp(74) : >>> >> error C2065: 'not' : undeclared identifier >>> >> >>> >> Adding #include <ciso646> to parse_specific.hpp gets it on the road, >>> >> but >>> >> then I come to something I don't see any obvious answer to: >>> >> >>> >>> It seems that you're using the version in the 'master' branch. Can you >>> try the latest from 0.5-devel? >>> >>> Anyway the "real" fix would be to change 'not' into !. >> >> Just a point about the use of `not` and `or` that have made their way into >> the code, but I had no idea that these were keywords in C++. In fact, IMO >> they're much clearer than writing `!` or `||` etc. but I've never seen >> this. Can anyone explain why they exist but are never used? >> > > I think it's because vendors aren't quick to support them natively in > the compiler. GCC takes this in stride just fine as does other vendors > (Intel's compiler is another one I know that works pretty well). I > would quote the appropriate parts of the C++ standard if I had a copy > (which I promise I should buy someday soon) but anyway it's something > really annoying to me for non-conformant compilers like MSVC. > > I also like them better but unfortunately to support more compilers > we're going to have to stick with !, ||, && et al. > > -- > Dean Michael Berris > cplusplus-soup.com | twitter.com/deanberris > linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com > Just found http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#C.2B.2B_operator_synonyms which is the best explanation I've found so far and quotes the relevant parts in the cite-note I believe. As a side-note, I too prefer `and` over `&&`, though for portability I think we should stick to the latter. Jeroen |