blob: 27dec6b8127dc41bc016626345220a054b5ed075 [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001
2[/ Copyright 2005-2008 Daniel James.
3 / Distributed under the Boost Software License, Version 1.0. (See accompanying
4 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ]
5
6[section:disable Disabling The Extensions]
7
8While [classref boost::hash]'s extensions are generally useful, you might want
9to turn them of in order to check that your code will work with other
10implementations of TR1. To do this define the macro `BOOST_HASH_NO_EXTENSIONS`.
11When this macro is defined, only the specialisations detailed
12in TR1 will be declared. But, if you later undefine the macro and include
13<[headerref boost/functional/hash.hpp]> then the non-specialised form will be defined
14- activating the extensions.
15
16It is strongly recommended that you never undefine the macro - and only define
17it so that it applies to the complete translation unit, either by defining it
18at the beginning of the main source file or, preferably, by using a compiler
19switch or preference. And you really should never define it in header files.
20
21If you are writing a library which has code in the header which requires the
22extensions, then the best action is to tell users not to define the macro.
23Their code won't ['require] the macro.
24
25Translation units that are compiled with the macro defined will link with units
26that were compiled without it. This feature has been designed to avoid ODR
27violations.
28
29[endsect]