bigint icon indicating copy to clipboard operation
bigint copied to clipboard

Not correct string number

Open tigertv opened this issue 5 years ago • 3 comments

Bigint a("m");

The following code gives a loop.

tigertv avatar Nov 09 '20 14:11 tigertv

Runnable example

"m" isnt a valid argument. What output do you expect?

Can either:

  1. Throw
  2. Cast to 0

I'm leaning mostly towards (1)

kasparsklavins avatar Nov 09 '20 14:11 kasparsklavins

Exception, not a loop.

tigertv avatar Nov 09 '20 14:11 tigertv

Throwing makes the most sense, or in the case that -fno-exceptions is on, then std::abort() and document that invalid input is simply not tolerated.

Qix- avatar Nov 19 '21 16:11 Qix-