boost_no_cxx98_function_base.ipp 753 B

12345678910111213141516171819202122232425262728
  1. // (C) Copyright John Maddock 2017.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/config for most recent version.
  6. // MACRO: BOOST_NO_CXX98_FUNCTION_BASE
  7. // TITLE: std::unary_function and std::binary_function
  8. // DESCRIPTION: The std lib has unary_function and binary_function.
  9. #include <functional>
  10. namespace boost_no_cxx98_function_base{
  11. struct A : public std::unary_function<int, int>{};
  12. struct B : public std::binary_function<int, int, int>{};
  13. int test()
  14. {
  15. A a;
  16. B b;
  17. (void)a;
  18. (void)b;
  19. return static_cast<B::result_type>(0);
  20. }
  21. }