hello-mcpp中编译报错'auto' not allowed in function return type
-
@yiten94 在 hello-mcpp中编译报错'auto' not allowed in function return type 中说:
error: 'auto' not allowed in function
该问题已经修复
- commit: https://github.com/Sunrisepeak/mcpp-standard/commit/7cfa6bce0d4356e492bf4a809de188cc0609151e
在教程项目根目录运行代码命令即可更新到最新代码(或手动用git进行同步
d2x update
-
多谢@SPeak
系统是mac os 14.4,练习的名字是hello-cpp,即 项目使用教程/引导中的例子。
详细输出为:
Progress: [>---------------------------] 0/27
[Target: 00-0-hello-mcpp] - normal
Error: Compilation/Running failed for dslings/hello-mcpp.cpp
The code exist some error!
---------C-Output---------
[ 23%]: cache compiling.release dslings/hello-mcpp.cpp
error: dslings/d2x/common.hpp:36:12: error: 'auto' not allowed in function return type
static auto test(U* f) -> decltype((f)(std::declval<Args>()...), std::true_type());
^~~~
dslings/d2x/common.hpp:36:27: error: expected ';' at end of declaration list
static auto test(U f) -> decltype((*f)(std::declval<Args>()...), std::true_type());
^
;
dslings/d2x/common.hpp:42:12: error: unknown type name 'constexpr'
static constexpr bool value = decltype(test<F>(nullptr))::value;
^
2 warnings and 3 errors generated.in dslings/hello-mcpp.cpp
AI-Tips-Config: https://d2learn.org/docs/xlings
---------E-Files---------
dslings/hello-mcpp.cppHomepage: https://github.com/d2learn/xlings
-
@yiten94 在 hello-mcpp中编译报错'auto' not allowed in function return type 中说:
error: 'auto' not allowed in function
该问题已经修复
- commit: https://github.com/Sunrisepeak/mcpp-standard/commit/7cfa6bce0d4356e492bf4a809de188cc0609151e
在教程项目根目录运行代码命令即可更新到最新代码(或手动用git进行同步
d2x update
-
刚刚更新优化了一下工具在macos平台上的控制台刷新机制
如果macos上遇到控制台的输出不刷新或重复输出问题, 可以运行下面命令进行更新一下工具(默认只会覆盖xlings的核心代码, 不用但心之前的安装或配置的环境和数据缓存
curl -fsSL https://d2learn.org/xlings-install.sh | bash
-
S SPeak 将这个主题转为问答主题
-
S SPeak 将这个主题标记为已解决
-
Y yiten94 将这个主题标记为已解决