Main MRPT website > C++ reference for MRPT 1.5.3
compiler_fixes.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 
10 #pragma once
11 
12 #define _USE_MATH_DEFINES // (For VS to define M_PI, etc. in cmath)
13 
14 /* ------------------------------------
15  Disable some warnings
16  ------------------------------------ */
17 #if defined(_MSC_VER)
18  #pragma warning(disable:4127) // Disable conditional expression is constant (it shows up in templates where it's correct)
19  #pragma warning(disable:4244) // argument conversion "possible loss of data"
20  #pragma warning(disable:4503) // (Compiler: Visual C++ 2010) Disable warning for too long decorated name
21  //#pragma warning(disable:4305) // truncation
22  //#pragma warning(disable:4308) // Disable warning for Eigen3 libs: negative integral converted to unsigned
23  #pragma warning(disable:4714) // force inlined -> not inlined (in Eigen3)
24  #pragma warning(disable:4267) // truncation size_t -> type
25  #pragma warning(disable:4290) // Visual C++ does not implement decl. specifiers: throw(A,B,...)
26  #pragma warning(disable:4251) // Visual C++ 2003+ warnings on STL classes when exporting to DLL...
27  #pragma warning(disable:4275) // DLL export class derived from STL
28  #if (_MSC_VER >= 1400 )
29  // MS believes they have the right to deprecate functions in the C++ Standard STL... disable their warnings:
30  #ifndef _SCL_SECURE_NO_WARNINGS
31  #define _SCL_SECURE_NO_WARNINGS
32  #endif
33  //#pragma warning(disable:4996) // Deprecated functions
34  // For the new secure library in VC++8
35  #if !defined(_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
36  #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
37  #endif
38  #endif
39 #endif
40 
41 // Avoid conflicting declaration of max macro in windows headers
42 #if defined(MRPT_OS_WINDOWS) && !defined(NOMINMAX)
43 # define NOMINMAX
44 # ifdef max
45 # undef max
46 # undef min
47 # endif
48 #endif



Page generated by Doxygen 1.8.13 for MRPT 1.5.3 at Mon Oct 30 10:27:08 UTC 2017