Name resolution for recursive trailing return type
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I found a weird difference between explicit and automatic trailing return types. In the following code, we define a struct templated on an integer and an iter function, which take one object of this type as argument. The return type depends on the result of calling itself after decrementing the template value. To break the instantiation loop (or so I thought), I provide a specialization which returns a non-dependent type. We have a toy main to instantiate the templates. Here is a bit of code: template struct Int {}; constexpr auto iter(Int)