c++
1std::vector<int> vec = {5,10}; 2int arr[] = {5,10}; 3std::map<std::string, int> ma = {{"Hoge",5},{"Fuga",10}}; 4 5from(vec) >> /*ほんとはごにょごにょ*/ to_vector(); // {5,10} 6from_array(arr) >> /*ごにょごにょ*/ to_vector(); // {5,10} 7from(ma) >> /*ごにょごにょ*/ to_map([](auto result){return result.frist;}); // {{"Hoge",{"Hoge",5}},{"Fuga",{"Fuga",10}}}
上記のようにcpplinqにstlコンテナを渡して何かしらの処理(今やりたいのはjoin)の後
受け取ろうとすると、vectorや配列はvector<int>を返すのに対して
mapはmap<string, pair<string, int>>のコンテナを返してしまいます。
これをmap<string, int>の形式で受け取りたい場合の対処ってないものでしょうか?
ご回答よろしくお願いしますm(_ _)m
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/12/11 12:28 編集
2015/12/11 15:24
2015/12/12 07:52