boost_no_cxx17_inline_variables.ipp 561 B

123456789101112131415161718192021222324252627
  1. /*
  2. Copyright 2017 Glen Joseph Fernandes
  3. (glenjofe@gmail.com)
  4. Distributed under Boost Software License, Version 1.0.
  5. (See accompanying file LICENSE_1_0.txt or copy at
  6. http://www.boost.org/LICENSE_1_0.txt)
  7. */
  8. // MACRO: BOOST_NO_CXX17_INLINE_VARIABLES
  9. // TITLE: C++17 inline variables
  10. // DESCRIPTION: C++17 inline variables are not supported.
  11. namespace boost_no_cxx17_inline_variables {
  12. inline const int Value = 1;
  13. struct Type {
  14. static inline const int value = 1;
  15. };
  16. int test()
  17. {
  18. return Type::value - Value;
  19. }
  20. } /* boost_no_cxx17_inline_variables */