:github_url: https://github.com/svenevs/exhale-companion .. _program_listing_file_ellcpp_utility.hpp: Program Listing for File utility.hpp ==================================== |exhale_lsh| :ref:`Return to documentation for file ` (``ellcpp/utility.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // -*- coding: utf-8 -*- #pragma once #include #include #include using Arr = xt::xarray; template constexpr auto zeros(std::initializer_list&& x) -> typename std::enable_if::value, Arr>::type { return Arr {xt::zeros(x)}; } template constexpr auto zeros(const T& /* unused */) noexcept(noexcept(T {})) -> typename std::enable_if::value, T>::type { return T {}; } template constexpr auto zeros(const T& x) -> typename std::enable_if::value, T>::type { return T {xt::zeros({x.size()})}; }