I needed this facility for the serialization system. I couldn't find it
anywhere so I implemented my own version. I worked on it just enough to
make it adequate for my purposes. I'm sure it could be improved. I ran
into annoying problems in that it generated a lot of syntax errors with
borland compilers. On some gcc versions it issues warnings - which I
suspect are probably correct.
I think its utility and purpose are under appreciated. But it really needs
to be worked on some more to make a case for promoting it into more boost
usage.
Also this might be related to scaler
Dear all,
I was playing with the serialization library, and ran into the BOOST_STRONG_TYPEDEF. In our own development environment we have a similar feature based on the article 'True typedefs' from Matthew Wilson (CUJ march 2003):
BOOST_STRONG_TYPEDEF(long, HBLA); BOOST_STRONG_TYPEDEF(long, HBLUB);
HBLABLA hBla(1); HBLUB hBlub(3); bool bOk = false;
bOk = (hBlub == hBla); //rejected if base types are different bOk = (hBlub != hBla); //does not compile on VC 7.1 bOk = (hBlub < hBla); //rejected if base types are different
hBlub = hBla; //accepted by boost_strong_typedef, this is a deliberate choice
So I guess one can discuss about some behavior.
But perhaps if it supports '==', it should also support '!='?
Wkr, me