非常大的枚举器(> 64 位类型)

Extremely large enumerators (> 64 bits types)

TL;DR 一个枚举器可以容纳多少个元素,这个数字会大于 64 位或 96 位数字吗?

根据我使用 C 和 C++ 的经验,我发现可以编译的最大变量类型是 96 位(12 字节),甚至是 GCC 64 位的非标准添加。因此,我开始考虑枚举器以及枚举器的大小。比方说,为了简单起见,我有一个名为 foo:

的枚举器类型
enum foo
{
    //Insert types here
}

并且我们的枚举器中填充了大量的类型:

enum foo
{
    type1,
    type2,
    type3,
        //Some keyboard-time later....
    type9999999999999999999999999999999999999997,
    type9999999999999999999999999999999999999998,
    type9999999999999999999999999999999999999999,
    type10000000000000000000000000000000000000000 //That's fifty zeroes
}

这还能编译吗? (是的,我知道编译可以让我很好地了解冰河时代持续多长时间,但仍然)我是否能够声明一个 foo,其中每个 type 的值小号?

来自标准:

For an enumeration whose underlying type is not fixed, the underlying type is an integral type that can represent all the enumerator values defined in the enumeration. If no integral type can represent all the enumerator values, the enumeration is ill-formed.

因此对于符合标准的编译器,如果没有可以容纳所有枚举器值的整数类型,则程序不应编译。

这是来自工作草案 https://isocpp.org/std/the-standard,但我怀疑那部分已经更改。