summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-03-04 20:27:12 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2025-03-05 20:07:18 +0000
commit1df19efd78b5f61b89b953d133baf1a5ccf963dd (patch)
tree2d8df59106b0ee7a42f6be3d8f305ecbf424aa38 /lib
parentCache the camera's view matrix (diff)
downloadilt-1df19efd78b5f61b89b953d133baf1a5ccf963dd.tar.bz2
ilt-1df19efd78b5f61b89b953d133baf1a5ccf963dd.tar.xz
ilt-1df19efd78b5f61b89b953d133baf1a5ccf963dd.zip
Constrain operator* for array*functor
Stops it being a broken candidate for array*array
Diffstat (limited to 'lib')
-rw-r--r--lib/collections.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/collections.h b/lib/collections.h
index 27eff0a..b921424 100644
--- a/lib/collections.h
+++ b/lib/collections.h
@@ -45,6 +45,7 @@ operator*(const std::array<T, first> & a, const std::array<V, second> & b)
template<typename T, std::size_t N>
[[nodiscard]] constexpr auto
operator*(const std::array<T, N> & in, auto && f)
+ requires requires { f(in.front()); }
{
std::array<decltype(f(in[0])), N> out;