| 180 | |
| 181 | template<typename... Args> |
| 182 | double push(Args&&... args) { |
| 183 | if constexpr (std::is_arithmetic_v<T>) |
| 184 | (arr_.push_back(static_cast<T>(args)), ...); |
| 185 | else |
| 186 | (arr_.push_back(std::forward<Args>(args)), ...); |
| 187 | length = static_cast<double>(arr_.size()); |
| 188 | return length; |
| 189 | } |
| 190 | |
| 191 | Array<T>* reverse() { |
| 192 | std::reverse(arr_.begin(), arr_.end()); |
no outgoing calls