github_15.cpp 489 B

123456789101112131415161718192021
  1. // Copyright Louis Dionne 2013-2017
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
  4. #include <boost/hana/functional/always.hpp>
  5. #include <support/tracked.hpp>
  6. #include <utility>
  7. namespace hana = boost::hana;
  8. template <typename T>
  9. decltype(auto) call_always(T&& x) {
  10. return hana::always(std::forward<T>(x))();
  11. }
  12. int main() {
  13. auto copy = call_always(Tracked{1});
  14. (void)copy;
  15. }