static.cpp 796 B

123456789101112131415161718192021222324
  1. /*=============================================================================
  2. Copyright (c) 2017 Paul Fultz II
  3. static.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/static.hpp>
  8. #include "test.hpp"
  9. // TODO: Test infix
  10. static constexpr boost::hof::static_<binary_class> binary_static = {};
  11. static constexpr boost::hof::static_<void_class> void_static = {};
  12. static constexpr boost::hof::static_<mono_class> mono_static = {};
  13. BOOST_HOF_TEST_CASE()
  14. {
  15. void_static(1);
  16. BOOST_HOF_TEST_CHECK(3 == binary_static(1, 2));
  17. BOOST_HOF_TEST_CHECK(3 == mono_static(2));
  18. }