Any easy way to overload all kinds of arithmetic operators (+
, -
, *
, /
, +=
, ...) for std::array
and std::vector
? The arithmetic operations are member-wise. Something like the following
template<class ContainerT, class opT>
ContainerT operator opT(ContainerT const& a, ContainerT const& b)
{
....
}
template<class ContainerT, class opT>
ContainerT operator opT=(ContainerT const& a, ContainerT const& b)
{
....
}