• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Copyright (c) 2017 Paul Fultz II
3     unpack_uncallable.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>
18     constexpr static auto apply(F&&, S&& s) BOOST_HOF_RETURNS(s.bar);
19 };
20 }
21 
main()22 int main() {
23     boost::hof::unpack(boost::hof::always(1))(foo{});
24 }
25