3 Forward declares `boost::hana::fill`.
5 @copyright Louis Dionne 2013-2017
6 Distributed under the Boost Software License, Version 1.0.
7 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_HANA_FWD_FILL_HPP
11 #define BOOST_HANA_FWD_FILL_HPP
13 #include <boost/hana/config.hpp>
14 #include <boost/hana/core/when.hpp>
17 namespace boost { namespace hana {
18 //! Replace all the elements of a structure with a fixed value.
19 //! @ingroup group-Functor
24 //! Given `F` a Functor, the signature is
26 //! \mathtt{fill} : F(T) \times U \to F(U)
30 //! The structure to fill with a `value`.
33 //! A value by which every element `x` of the structure is replaced,
39 //! @include example/fill.cpp
40 #ifdef BOOST_HANA_DOXYGEN_INVOKED
41 constexpr auto fill = [](auto&& xs, auto&& value) {
42 return tag-dispatched;
45 template <typename Xs, typename = void>
46 struct fill_impl : fill_impl<Xs, when<true>> { };
49 template <typename Xs, typename Value>
50 constexpr auto operator()(Xs&& xs, Value&& value) const;
53 BOOST_HANA_INLINE_VARIABLE constexpr fill_t fill{};
55 }} // end namespace boost::hana
57 #endif // !BOOST_HANA_FWD_FILL_HPP