vcpkg/ports/selene/trivial-pixel.patch
nicole mazzuca ff190a561a
[macos ci] update 2021-07-27 ()
* update 2021-07-27

macOS -> 11.5.1, XCode -> 12.5.1

* update azure-pipelines

* update sha of macfuse

* change how macos-ci-base works

* fix build errors

* fix itpp:linux

* more fixes

* remove tab

* allow version changes in all the remove/rename-version patches

* fix libunistring for real

* robert CR
2021-08-04 13:27:40 -07:00

24 lines
1.3 KiB
Diff

--- 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 <typename... Args, typename = std::enable_if_t<sizeof...(Args) == nr_channels_>>
- constexpr Pixel(Args... args) noexcept;
+ template <typename Arg1, typename... Args, typename = std::enable_if_t<sizeof...(Args) + 1 == nr_channels_>>
+ constexpr Pixel(Arg1 arg1, Args... args) noexcept;
constexpr explicit Pixel(const std::array<T, nr_channels>& arr) noexcept;
@@ -216,8 +216,8 @@
template <typename T, std::size_t nr_channels_, PixelFormat pixel_format_>
-template <typename... Args, typename>
-constexpr Pixel<T, nr_channels_, pixel_format_>::Pixel(Args... args) noexcept
- : data_{{static_cast<T>(args)...}}
+template <typename Arg1, typename... Args, typename>
+constexpr Pixel<T, nr_channels_, pixel_format_>::Pixel(Arg1 arg1, Args... args) noexcept
+ : data_{{static_cast<T>(arg1), static_cast<T>(args)...}}
{
static_assert(std::is_trivial<Pixel<T, nr_channels_, pixel_format_>>::value, "Pixel type is not trivial");
static_assert(std::is_standard_layout<Pixel<T, nr_channels_, pixel_format_>>::value,
"Pixel type is not standard layout");