2013-10-04から1日間の記事一覧
N3450を見て、非メンバ関数版のto_index, to_iteratorなんとなく書いてみました。本当ならクラスのメンバ関数ですが、気にせずに…。 #include <iterator> #include <type_traits> template <class Container> auto to_index(const Container& container, typename Container::const_iterator it) -> d</class></type_traits></iterator>…