boost_no_void_returns.ipp 724 B

12345678910111213141516171819202122232425262728293031323334
  1. // (C) Copyright John Maddock 2001.
  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_VOID_RETURNS
  7. // TITLE: no void returns
  8. // DESCRIPTION: The compiler does not allow a void function
  9. // to return the result of calling another void
  10. // function.
  11. //
  12. // void f() {}
  13. // void g() { return f(); }
  14. namespace boost_no_void_returns{
  15. void f() {}
  16. void g() { return f(); }
  17. int test()
  18. {
  19. return 0;
  20. }
  21. }