]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/pool/test/pool_msvc_compiler_bug_test.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / pool / test / pool_msvc_compiler_bug_test.cpp
1 // Copyright (C) 2008 Jurko Gospodnetic
2 //
3 // Distributed under the Boost Software License, Version 1.0. (See
4 // accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6
7
8 // This tests whether the Boost Pool library managed to get a regression and
9 // hit the MSVC 'variables exported to global namespace' bug again. This bug
10 // affects at least MSVC 7.1 & 8.0 releases and has been fixed in the MSVC 9.0
11 // release.
12 //
13 // If the bug exists this test should fail to compile, complaining about an
14 // ambiguous CRITICAL_SECTION symbol. The bug got fixed by making the boost/
15 // /pool/detail/mutex.hpp header reference all Windows API constants using their
16 // fully qualified names.
17 //
18 // To see the bug in action without using any Boost libraries run the
19 // following program:
20 //
21 // namespace One { class Brick; }
22 // namespace Two
23 // {
24 // using namespace One;
25 // template <class TinyTemplateParam> class TinyClass {};
26 // }
27 // class Brick {};
28 // Brick brick;
29 // int main() {}
30 // (17.04.2008.) (Jurko)
31
32
33 #include "boost/archive/text_iarchive.hpp"
34 #include "boost/pool/detail/mutex.hpp"
35 // Including "boost/pool/pool_alloc.hpp" instead of mutex.hpp should work as
36 // well.
37
38 int main()
39 {
40 }