libpqxx 3.1.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

compiler-internal-pre.hxx
1 /*-------------------------------------------------------------------------
2 *
3 * FILE
4 * pqxx/compiler-internal-pre.hxx
5 *
6 * DESCRIPTION
7 * Compiler deficiency workarounds for compiling libpqxx headers.
8 * To be called at the start of each libpqxx header, in order to
9 * push the client program's settings and apply libpqxx's settings.
10 * Must be balanced by an include of -header-post.hxx at the end
11 * of the header.
12 *
13 * Copyright (c) 2006,2007, Jeroen T. Vermeulen <jtv@xs4all.nl>
14 *
15 * See COPYING for copyright license. If you did not receive a file called
16 * COPYING with this source code, please notify the distributor of this mistake,
17 * or contact the author.
18 *
19 *-------------------------------------------------------------------------
20 */
21 // NO GUARDS HERE! This code should be executed every time!
22
23 #ifdef _WIN32
24
25 #ifdef _MSC_VER
26
27 // Save client program warning state, and set warning level 4.
28 // Setting the warning level explicitly ensures that libpqxx
29 // headers will work with this warning level as well.
30 #pragma warning (push,4)
31
32 #pragma warning (disable: 4251)
33 #pragma warning (disable: 4258) // Complains that for-scope usage is correct
34 #pragma warning (disable: 4273)
35 #pragma warning (disable: 4275)
36 #pragma warning (disable: 4290)
37 #pragma warning (disable: 4355)
38 #pragma warning (disable: 4511) // Copy constructor could not be generated
39 #pragma warning (disable: 4512) // Assignment operator could not be generated
40 #pragma warning (disable: 4786)
41 #pragma warning (disable: 4800) // Performance warning for boolean conversions
42 #pragma warning (disable: 4996) // Complaint that strncpy() "may" be unsafe
43
44 #endif // _MSC_VER
45
46 #endif // _WIN32
47