2012-04-21から1日間の記事一覧

Sprout で指定した値で配列の初期化を行う

sprout::fill を使用します。 [ソース] #include <sprout/array.hpp> #include <sprout/algorithm/fill.hpp> #include <sprout/algorithm/fill_n.hpp> #include <sprout/pit.hpp> int main(){ // 今回は、初期化時に fill して欲しいので // 処理結果の型を sprout::pit でラップして引数に渡す static constexpr auto result = sprout::fill(sprout::pit</sprout/pit.hpp></sprout/algorithm/fill_n.hpp></sprout/algorithm/fill.hpp></sprout/array.hpp>