error_info_rv_const_test.cpp 555 B

12345678910111213141516171819202122232425262728
  1. //Copyright (c) 2006-2015 Emil Dotchevski and Reverge Studios, Inc.
  2. //Distributed under the Boost Software License, Version 1.0. (See accompanying
  3. //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. #include <boost/exception/info.hpp>
  5. #ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
  6. int
  7. main()
  8. {
  9. return 0;
  10. }
  11. #else
  12. template <class I>
  13. I const
  14. rv_const( I i )
  15. {
  16. return i;
  17. }
  18. template <class E,class I>
  19. E const &
  20. add_info( E const & e, I i )
  21. {
  22. return e << rv_const(i);
  23. }
  24. #include "error_info_test.hpp"
  25. #endif