English 中文(简体)
为什么没有大的分类? [闭门]
原标题:Why is there no unsized Integer type? [closed]

STL为什么不包含无约束的分类数据类型?

I feel like it s a data type whose purpose is similar to that of a string.
Programmers would not have to worry about overflowing values and could work with much larger numbers.

因此,如果存在缺席的具体原因,我会感到奇怪。

This isn t an issue on how to implement or use one from a 3rd party library, but just a question as to why the language doesn t already come with one. Any links on the matter are appreciated.

最佳回答
问题回答

Because even way back when the STL was designed:

There were already significantly better arbitrary precision integer libraries in C. Sure they weren t officially classes, but the structures they used still did the job. An STL implementation wouldn t really get a great deal of uptake from those who need arbitrary precision integers, which leads me to my second reason:

并非许多人实际上需要任意的精确度。 那些这样做的人在第三方图书馆里开车。 对大多数32个年龄段的人来说,这些日子的工作是这样。 对许多人来说,他们仍然这样做。 业绩大大提高。 即便是在没有本地64比特操作的系统中,你也可以用一些指示对他们进行模拟,而且仍然大大快于任意进行分类(不管你如何使这种制度变得软弱无力,任意部分和可能分配得过高,都会使其比两次低廉的分类作业和手工操作更加昂贵)。

不仅如此,圣鲁斯特鲁普才认为,它有广泛的呼吁,以适应他对《刑法》的看法。

我认为,一个更好的问题是,为什么在STL中,没有货币或任意的精准等级,因为我认为这是一个非常常见的问题,但答案是一样的。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签