[英]C++ using v typedef typename
可以使用using
關鍵字代替使用typedef typename
作為迭代器嗎?
using schedulable_ops_t = std::list<mlir::Operation*>;
typedef typename schedulable_ops_t::iterator schedulable_ops_iterator_t;
我嘗試using schedulable_ops_t::iterator = schedulable_ops_iterator_t;
但我得到一個錯誤is not a base type for type
。
這個記錄
using schedulable_ops_t::iterator = schedulable_ops_iterator_t;
是不正確的。 看來你的意思
using schedulable_ops_iterator_t = typename schedulable_ops_t::iterator;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.