config.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // Boost.Range library
  2. //
  3. // Copyright Thorsten Ottosen 2003-2004. Use, modification and
  4. // distribution is subject to the Boost Software License, Version
  5. // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. //
  8. // For more information, see http://www.boost.org/libs/range/
  9. //
  10. #ifndef BOOST_RANGE_CONFIG_HPP
  11. #define BOOST_RANGE_CONFIG_HPP
  12. #include <boost/detail/workaround.hpp>
  13. #if defined(_MSC_VER)
  14. # pragma once
  15. #endif
  16. #include <boost/config.hpp>
  17. #ifdef BOOST_RANGE_DEDUCED_TYPENAME
  18. #error "macro already defined!"
  19. #endif
  20. #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
  21. # define BOOST_RANGE_DEDUCED_TYPENAME typename
  22. #else
  23. #define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME
  24. #endif
  25. #ifdef BOOST_RANGE_NO_ARRAY_SUPPORT
  26. #error "macro already defined!"
  27. #endif
  28. #if BOOST_WORKAROUND( __MWERKS__, <= 0x3003 )
  29. #define BOOST_RANGE_NO_ARRAY_SUPPORT 1
  30. #endif
  31. #ifdef BOOST_RANGE_NO_ARRAY_SUPPORT
  32. #define BOOST_RANGE_ARRAY_REF() (boost_range_array)
  33. #define BOOST_RANGE_NO_STATIC_ASSERT
  34. #else
  35. #define BOOST_RANGE_ARRAY_REF() (&boost_range_array)
  36. #endif
  37. #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)))
  38. # define BOOST_RANGE_UNUSED __attribute__((unused))
  39. #else
  40. # define BOOST_RANGE_UNUSED
  41. #endif
  42. #endif