Intel Warned Chinese Companies of Chip Flaw Before U.S. Government
foxbusiness.com5 ポイント投稿者 smitherfield0 コメント
template<typename... Ts>
class SoA : public tuple<vector<Ts>...> {
// ...
template<size_t... Is>
tuple<Ts&...> subscript(size_t i, index_sequence<Is...>) {
return {get<Is>(*this)[i]...};
}
public:
// ...
auto operator[](size_t i) {
return subscript(i, index_sequence_for<Ts...>{});
}
}; class Array
def neighbor_sums
map.with_index do |_, i|
fetch(i - 1 & 0xFF_FF_FF_FF, 0) + fetch(i + 1, 0)
end
end
end
[1, 1, 1, 1].neighbor_sums # [1, 2, 2, 1] ios::sync_with_stdio(false);
https://en.cppreference.com/w/cpp/io/ios_base/sync_with_stdi...
This is a somewhat comical statement in a thread about "Rewrite it in Rust."