|
Boost Users : |
Subject: Re: [Boost-users] problems with C++ integer types
From: Robert Ramey (ramey_at_[hidden])
Date: 2012-01-29 23:15:46
Eric Niebler wrote:
> On 1/29/2012 3:01 PM, Robert Ramey wrote:
>> I'm very confused about a number of things related to C++ standard
>> and boost libraries
>> dealing with numeric types.
> <snip>
>
> All good questions. You're really asking about any user-defined
> numeric-like type, not just boost ones. Probably best to ask on
> comp.lang.c++.moderated. If you get an answer there, please post it
> here.
Hmmm - that was good advice. I found
which - among other things says:
"*YOU* are allowed to provide a specialization for a user defined
type. The implementation is not allowed to provide a specialization
for a non-fundamental standard type."
which is the answer to my question.
it also answers indirectly my other questions. In particular
I realize now that boost/type_traits/is_integral.hpp is should't
be implemented in terms of numeric_limits - it's fine the way
it is. Also boost/type_traits/make_signed can't be implemented
in terms of numeric_limits either so IT'S fine the way
it is. If I want have make_signed<safe_integer.. I'll have
to specialize it myself - which OK.
Soooo, all in all a false alarm.
Robert Ramey
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