boost_no_auto_multidecl.ipp 751 B

1234567891011121314151617181920212223242526
  1. // Copyright (C) 2009 Andrey Semashev
  2. // Copyright (C) 2017 Dynatrace
  3. // Use, modification and distribution are subject to the
  4. // Boost Software License, Version 1.0. (See accompanying file
  5. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. // See http://www.boost.org/libs/config for most recent version.
  7. // MACRO: BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
  8. // TITLE: C++0x auto multideclarators unavailable
  9. // DESCRIPTION: The compiler does not support C++0x declarations of series of variables with automatically deduced type
  10. namespace boost_no_cxx11_auto_multideclarations {
  11. void check_f(short&, short*&)
  12. {
  13. }
  14. int test()
  15. {
  16. auto x = static_cast<short>(10), *y = &x;
  17. check_f(x, y);
  18. return 0;
  19. }
  20. }