ananas
ananas copied to clipboard
Future.h内有个小问题
static_assert(std::is_same<T, void>::value || std::is_copy_constructible<T>() || std::is_move_constructible<T>(), "must be copyable or movable or void"); 修改为 static_assert(std::is_same<T, void>::value || std::is_copy_constructible<T>::value || std::is_move_constructible<T>::value, "must be copyable or movable or void");
感谢指出。 我编译器较老,4.8.5,这两种写法都支持。你的版本是?
vs2015、vs2019处理的
vs2015、vs2019处理的
没有尝试过windows,ananas只能在linux和macos运行,但是理论上future可以抠出来在任意平台运行。另外这两种写法编译器应该都予支持,我这种是TCPL4上的写法。