--- a/selene/img/pixel/Pixel.hpp +++ b/selene/img/pixel/Pixel.hpp @@ -45,6 +45,6 @@ constexpr Pixel() noexcept = default; ///< Default constructor. Pixel values are uninitialized. - template > - constexpr Pixel(Args... args) noexcept; + template > + constexpr Pixel(Arg1 arg1, Args... args) noexcept; constexpr explicit Pixel(const std::array& arr) noexcept; @@ -216,8 +216,8 @@ template -template -constexpr Pixel::Pixel(Args... args) noexcept - : data_{{static_cast(args)...}} +template +constexpr Pixel::Pixel(Arg1 arg1, Args... args) noexcept + : data_{{static_cast(arg1), static_cast(args)...}} { static_assert(std::is_trivial>::value, "Pixel type is not trivial"); static_assert(std::is_standard_layout>::value, "Pixel type is not standard layout");