gpt4 book ai didi

c++ - C++ 中 else 语句的最大数量

转载 作者:可可西里 更新时间:2023-11-01 17:35:29 26 4
gpt4 key购买 nike

我有一些遗留代码,用于使用巨大的 if/else if/else if... block 实现的消息传递系统。当我想添加一个新的 else block 时,Visual Studio 2010 出现“内部编译器错误”。

您是否知道 C++ 标准或实现是否定义了 else 语句的最大数量?如果定义了实现,我可以在哪里找到 Visual Studio 2010 的最大数量?

由于历史原因,我无法更改代码,即使实现...不是很明智。

最佳答案

C++ 标准没有最低要求。它有一个推荐的最低要求,但不是必需的。

Nesting levels of compound statements, iteration control structures, and selection control structures [256].

一旦超出了实现的限制,行为是不确定的。

关于c++ - C++ 中 else 语句的最大数量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15855284/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com