Re: [boost] [preprocessor] Sequences vs. All Other Data Structures

Paul Mensonides:
As some sort of technological preview? It is not portable enough to be used within Boost, though perhaps a slew of regression failures will cause that to change (unlikely). <rant>MS, in particular, is too busy taking it upon themselves to "ensure C++ is relevant" to prioritize implementing the language.</rant> Also, one of the principles of Chaos is to have absolutely zero compiler workarounds, and that would have to stay if it was ever part of Boost.
Given your desire to avoid compiler workarounds, an on line code generator may be helpful. One of the happy results of going on line is kissing compiler workarounds good-bye. I've worked on the distribution of code generated by an on line code generator -- http://webEbenezer.net/build_integration.html . You're welcome to use that as a starting point if you like. Shalom, Brian Wood Ebenezer Enterprises http://webEbenezer.net

On Sun, 22 Apr 2012 22:05:26 -0500, Brian Wood wrote:
Given your desire to avoid compiler workarounds, an on line code generator may be helpful. One of the happy results of going on line is kissing compiler workarounds good-bye.
I've worked on the distribution of code generated by an on line code generator -- http://webEbenezer.net/build_integration.html . You're welcome to use that as a starting point if you like.
Interesting, but not necessary. If one is willing to interfere with the tool chain and fix a slew of errors in Windows headers (in particular), one can just integrate Wave or some other preprocessor into the tool chain. Regards, Paul Mensonides

I guess this thread was largely about communicating some things to Microsoft. I have an item to add to the list. I'm not sure of the terminology for this but it is supported in some of the newer versions of g++, but not in the version of VS 11 that I have. The code shown below is available here: http://webEbenezer.net/misc/direct.tar.bz2<http://webebenezer.net/misc/direct.tar.bz2>. This snippet is from cmwAmbassador.cc #ifdef ENDIAN_BIG , byteOrder(most_significant_first) #else , byteOrder(least_significant_first) #endif and this from cmwAmbassador.hh #ifdef ENDIAN_BIG ::cmw::ReceiveBufferTCPCompressed<LeastSignificantFirst> cmwBuf; #else ::cmw::ReceiveBufferTCPCompressed<SameFormat> cmwBuf; #endif uint8_t const byteOrder; I want to rewrite that as the following in the .hh file. #ifdef ENDIAN_BIG ::cmw::ReceiveBufferTCPCompressed<LeastSignificantFirst> cmwBuf; uint8_t const byteOrder = most_significant_first; #else ::cmw::ReceiveBufferTCPCompressed<SameFormat> cmwBuf; uint8_t const byteOrder = least_significant_first; #endif and be able to get rid of the ifdef in the .cc file. Microsoft: please add support for this and let me know when it is available. -- Brian Wood Ebenezer Enterprises http://webEbenezer.net <http://webebenezer.net/>

I guess this thread was largely about communicating some things to Microsoft. I have an item to add to the list. I'm not sure of the terminology for this but it is supported in some of the newer versions of g++, but not in the version of VS 11 that I have. The code shown below is available here: http://webEbenezer.net/misc/direct.tar.bz2<http://webebenezer.net/misc/direct.tar.bz2>.
This snippet is from cmwAmbassador.cc #ifdef ENDIAN_BIG , byteOrder(most_significant_first) #else , byteOrder(least_significant_first) #endif
and this from cmwAmbassador.hh
#ifdef ENDIAN_BIG ::cmw::ReceiveBufferTCPCompressed<LeastSignificantFirst> cmwBuf; #else ::cmw::ReceiveBufferTCPCompressed<SameFormat> cmwBuf; #endif
uint8_t const byteOrder;
I want to rewrite that as the following in the .hh file.
#ifdef ENDIAN_BIG ::cmw::ReceiveBufferTCPCompressed<LeastSignificantFirst> cmwBuf; uint8_t const byteOrder = most_significant_first; #else ::cmw::ReceiveBufferTCPCompressed<SameFormat> cmwBuf; uint8_t const byteOrder = least_significant_first; #endif
and be able to get rid of the ifdef in the .cc file. Microsoft: please add support for this and let me know when it is available.
This looks like a use of non-static data member initializers, a C++11 feature. GCC support for this feature has been added in 4.7, and VC does not yet support it. This is one of the many C++11 features in which VC lags behind GCC (others are variadic templates, uniform initialization, delegating constructors, user-defined literals, and many others). I agree that it would be nice if MS got VC up to speed on C++11, but what does this have to do with the preprocessor? Regards, Nate

On Wed, May 02, 2012 at 08:07:02AM +0000, Nathan Ridge wrote:
I guess this thread was largely about communicating some things to Microsoft. I agree that it would be nice if MS got VC up to speed on C++11, but what does this have to do with the preprocessor?
Nice attempt at hijacking, but why don't you file a proper bug report over at Connect instead where it can be properly tracked so that your interest can be properly accounted for when prioritising features for upcoming releases. At least that's how I understand that it's done. Heck, this is not even related to Boost in any way, you just happen to use some of its primitives. Doesn't the preprocessor rules state that the directive must be the first non-whitespace character on a line anyway? Your inline code looks a bit iffy in that respect. (How's GDnet treating you nowadays? :D) -- Lars Viklund | zao@acc.umu.se
participants (4)
-
Brian Wood
-
Lars Viklund
-
Nathan Ridge
-
Paul Mensonides