OLD | NEW |
| (Empty) |
1 // Copyright 2007-2009 Google Inc. | |
2 // | |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 // you may not use this file except in compliance with the License. | |
5 // You may obtain a copy of the License at | |
6 // | |
7 // http://www.apache.org/licenses/LICENSE-2.0 | |
8 // | |
9 // Unless required by applicable law or agreed to in writing, software | |
10 // distributed under the License is distributed on an "AS IS" BASIS, | |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 // See the License for the specific language governing permissions and | |
13 // limitations under the License. | |
14 // ======================================================================== | |
15 | |
16 // smartany library uses a poor compile time assert. It is actually generating | |
17 // runtime code to call the constructor of the assert class. Most likely to | |
18 // improve performance, the library uses a static instance of the compile time | |
19 // assert object. In theory the code is not thread-safe. In practice, since the | |
20 // compile time assert is an empty class, there should be no problems. The long | |
21 // term solution requires changing smartany to use a better compile time assert | |
22 // which is completely evaluated at compile time and it has no effects | |
23 // whatsoever at runtime. Short term, the code should include these wrappers | |
24 // to silence the compiler warning. | |
25 | |
26 #ifndef OMAHA_COMMON_SCOPED_ANY__ | |
27 #define OMAHA_COMMON_SCOPED_ANY__ | |
28 | |
29 #pragma warning(push) | |
30 // C4640: construction of local static object is not thread-safe | |
31 #pragma warning(disable : 4640) | |
32 #include "omaha/third_party/smartany/scoped_any.h" | |
33 #pragma warning(pop) | |
34 | |
35 #endif // OMAHA_COMMON_SCOPED_ANY__ | |
36 | |
OLD | NEW |