disable.qbk 1.4 KB

1234567891011121314151617181920212223242526272829
  1. [/ Copyright 2005-2008 Daniel James.
  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. [section:disable Disabling The Extensions]
  5. While [classref boost::hash]'s extensions are generally useful, you might want
  6. to turn them of in order to check that your code will work with other
  7. implementations of TR1. To do this define the macro `BOOST_HASH_NO_EXTENSIONS`.
  8. When this macro is defined, only the specialisations detailed
  9. in TR1 will be declared. But, if you later undefine the macro and include
  10. <[headerref boost/container_hash/hash.hpp]> then the non-specialised form will be defined
  11. - activating the extensions.
  12. It is strongly recommended that you never undefine the macro - and only define
  13. it so that it applies to the complete translation unit, either by defining it
  14. at the beginning of the main source file or, preferably, by using a compiler
  15. switch or preference. And you really should never define it in header files.
  16. If you are writing a library which has code in the header which requires the
  17. extensions, then the best action is to tell users not to define the macro.
  18. Their code won't ['require] the macro.
  19. Translation units that are compiled with the macro defined will link with units
  20. that were compiled without it. This feature has been designed to avoid ODR
  21. violations.
  22. [endsect]