Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <array>
- using namespace std;
- void test1 (array<int,10>);
- template <size_t N>
- void test2 (array<int,N>);
- // arrayのsizeはintではなくsize_t
- // template <int N>
- // void test2 (array<int,N>);
- void test(void)
- {
- array<int,10> xs {1,2,3,4,5,6,7,8,9,0};
- int ys[] {1,2,3,4,5,6,7,8,9,0};
- test1 (xs);
- // ダメなんだよね...
- // test1 (ys);
- test2(xs);
- // ダメなんだよね...
- // test2(ys);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement