Skip to content

Commit

Permalink
牧濑红莉栖第八题
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmos-in-h2o committed Aug 14, 2023
1 parent 606e22d commit 719fb1d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/群友提交/第八题/kurisu.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <iostream>
template<class Ty,size_t size>
struct array {
Ty* begin() { return arr; };
Ty* end() { return arr + size; };
Ty arr[size];
};

template<class T_, class... U_>
array(T_, U_...) -> array<T_, 1 + sizeof...(U_)>;

int main() {
::array arr{1, 2, 3, 4, 5};
for (const auto& i : arr) {
std::cout << i << ' ';
}
}

0 comments on commit 719fb1d

Please sign in to comment.