Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

N3417: Proposal for Unbounded-Precision Integer Types

117 views
Skip to first unread message

Helmut Zeisel

unread,
Apr 16, 2013, 3:41:18 PM4/16/13
to
What should be the result of unsigned_integer(-1) ?

Helmut


--
[ comp.std.c++ is moderated. To submit articles, try posting with your ]
[ newsreader. If that fails, use mailto:std-cpp...@vandevoorde.com ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]

Martin Shobe

unread,
Apr 18, 2013, 12:09:18 PM4/18/13
to

On 4/16/2013 2:41 PM, Helmut Zeisel wrote:
> What should be the result of unsigned_integer(-1) ?
>
> Helmut
>
>

The desire to remove unsigned_integer from the proposal. :)

While I can appreciate the desire for symmetry with the limited
precision integers, that symmetry is going to be broken with unlimited
precision integers. I personally would rather see unsigned_integer be a
special case of a more general bounded integer proposal. One where the
programmer could specify an arbitrary upper and lower bound.

Martin Shobe

Pete Becker

unread,
Apr 18, 2013, 12:08:30 PM4/18/13
to

On 2013-04-16 19:41:18 +0000, Helmut Zeisel said:

> What should be the result of unsigned_integer(-1) ?
>

It's an error.

--
Pete

rkadeFR

unread,
Apr 19, 2013, 11:12:45 AM4/19/13
to
On 18/04/2013 18:08, Pete Becker wrote:
>
>
> On 2013-04-16 19:41:18 +0000, Helmut Zeisel said:
>
>> What should be the result of unsigned_integer(-1) ?
>>
>
> It's an error.
>

Is it Undefined behavior ?

-- rkadeFR


--

Pete Becker

unread,
Apr 20, 2013, 8:19:15 AM4/20/13
to
On 2013-04-18 10:08:30 +0000, Pete Becker said:

> On 2013-04-16 19:41:18 +0000, Helmut Zeisel said:
>
>> What should be the result of unsigned_integer(-1) ?
>>
>
> It's an error.

Well, no, no longer. It's gone, replaced by the bits class, a dynamic bit set.
0 new messages