0

cilk_forオーバーセットの反復に使用しようとしていました。set に operator-(..) が定義されていないことがわかります。Cilk_for チュートリアルでは理由が説明されていますが、そのようなケースを処理する例は提供されていません。彼らは、次のものを提供する必要があると言いますが、値をどこにどのように配置するかわかりません:

リンクはこちら

difference_type operator-(termination_type, variable_type); // where to use this?

//my example
auto func = std::bind (my_functor, std::placeholders::_1);  

std::set<vertex_id> vertex_set;
// fill the vertex_set with some vertex ids

cilk_for (auto it = vertex_set.begin(); it!=vertex_set.end(); ++it) {
   func(*it) 
}

cilk コンパイラがこれを処理するために、演算子 (..) をどこでどのように指定すればよいですか?

variable_typeですset::iterator。違いの種類はありますdifference_type (ptrdiff_t)が、termination_type彼らの例では何ですか?

4

1 に答える 1