Boost logo

Boost Users :

From: gast128 (gast128_at_[hidden])
Date: 2005-02-07 16:43:25


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net