I just generated assembly output from g++ to confirm. It created a new function each time. I very much like the features of C++ but very disappointed to find this. I wonder how std::array made it into C++ if you can't template its size without bloating.