• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Copyright (c) 2017 Paul Fultz II
3     unpack.cpp
4     Distributed under the Boost Software License, Version 1.0. (See accompanying
5     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #include <boost/hof/unpack.hpp>
8 
9 struct foo
10 {};
11 
12 namespace boost { namespace hof {
13 
14 template<>
15 struct unpack_sequence<foo>
16 {
17     template<class F, class S>
applyboost::hof::unpack_sequence18     constexpr static int apply(F&&, S&&)
19     {
20         return 0;
21     }
22 };
23 }
24 
main()25 int main() {
26     boost::hof::unpack(boost::hof::always(1))(foo{});
27 }
28