|
@@ -18,20 +18,10 @@ namespace Core {
|
|
|
}
|
|
|
|
|
|
template<typename OT, typename... Args>
|
|
|
- Vector(OT a, Args&&... args) {
|
|
|
- init<0>(a, args...);
|
|
|
- }
|
|
|
-
|
|
|
- private:
|
|
|
- template<int I>
|
|
|
- void init() {
|
|
|
- static_assert(I == N, "vector parameters do not match its size");
|
|
|
- }
|
|
|
-
|
|
|
- template<int I, typename OT, typename... Args>
|
|
|
- void init(OT a, Args&&... args) {
|
|
|
- values[I] = static_cast<T>(a);
|
|
|
- init<I + 1>(args...);
|
|
|
+ Vector(OT a, Args&&... args)
|
|
|
+ : values(static_cast<T>(a), static_cast<T>(args)...) {
|
|
|
+ static_assert(sizeof...(args) + 1 == N,
|
|
|
+ "vector parameters do not match its size");
|
|
|
}
|
|
|
|
|
|
public:
|