boost_no_cxx11_trailing_result_types.ipp 679 B

1234567891011121314151617181920212223242526
  1. // (C) Copyright Andrey Semashev 2013
  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 more information.
  6. // MACRO: BOOST_NO_CXX11_TRAILING_RESULT_TYPES
  7. // TITLE: C++11 trailing function result types syntax.
  8. // DESCRIPTION: The compiler does not support the new C++11 function result types specification syntax.
  9. namespace boost_no_cxx11_trailing_result_types {
  10. template< typename T >
  11. auto foo(T const& t) -> T
  12. {
  13. return t;
  14. }
  15. int test()
  16. {
  17. return foo(0);
  18. }
  19. }