gpt4 book ai didi

C++ 类型列表及其在列表中的别名

转载 作者:太空狗 更新时间:2023-10-29 23:43:55 25 4
gpt4 key购买 nike

是否可以在 C++ 中创建类型列表,并在列表中包含其别名?

我想实现这样的目标:

using MyList = TypeList<int, float, MyList>;

最佳答案

不,这是不可能的,因为

type alias is a name that refers to a previously defined type (similar to typedef).

这是指使用

从这里开始: http://en.cppreference.com/w/cpp/language/type_alias

关于C++ 类型列表及其在列表中的别名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39059942/

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