Added additional constraints to list instantiation
This commit is contained in:
+6
-2
@@ -3,6 +3,7 @@
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
|
||||
// TODO: Add a function to calculate eigenvalues/vectors
|
||||
// TODO: Add a function to compute RREF
|
||||
@@ -29,9 +30,12 @@ public:
|
||||
Matrix(const Matrix<rows, columns> &other);
|
||||
|
||||
/**
|
||||
* @brief Initialize a matrix directly with any number of arguments
|
||||
* @brief Initialize a matrix directly with scalar values
|
||||
* Uses SFINAE to only accept arithmetic types (int, float, double, etc.)
|
||||
*/
|
||||
template <typename... Args> Matrix(Args... args);
|
||||
template <typename... Args,
|
||||
std::enable_if_t<(std::is_arithmetic_v<Args> && ...), int> = 0>
|
||||
Matrix(Args... args);
|
||||
|
||||
/**
|
||||
* @brief Create an identity matrix
|
||||
|
||||
Reference in New Issue
Block a user