always.cpp 539 B

1234567891011121314
  1. /*=============================================================================
  2. Copyright (c) 2017 Paul Fultz II
  3. always.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/always.hpp>
  8. #include <memory>
  9. int main() {
  10. auto f = boost::hof::always(std::unique_ptr<int>{new int(1)});
  11. auto i = f(1, 2, 3);
  12. (void)i;
  13. }