$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Guillaume Melquiond (guillaume.melquiond_at_[hidden])
Date: 2004-06-24 06:47:37
Hi,
Looking through the documentation of Boost.Variant (both 1.31 and cvs
versions), I see that "variant is itself LessThanComparable if and only
if every one of its bounded types meets the requirements of the
concept". The documentation directly hyper-links to the concept part of
Boost and this concept description explains that "LessThanComparable
types must have <, >, <=, and >= operators".
Unfortunately, boost::variant implementation only defines operator<. So
here we have a contradiction between the implementation and the
interface. The same kind of problem arises with operator!= and the
EqualityComparable concept.
I am not sure what the best solution is:
- define the missing operators in boost::variant,
- remove any reference to LessThanComparable and EqualityComparable
concepts from boost::variant documentation,
- correct the concepts so they only speak about operator< and
operator==.
The last solution corresponds to the way the concepts are defined in the
[lib.utilities] part of the C++ standard. But I would rather see the
missing operators defined in boost::variant if possible.
Regards,
Guillaume