Main MRPT website > C++ reference for MRPT 1.4.0
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-2016, 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:4786) // (Compiler: Visual C++) Disable warning for too long debug names:
19 #pragma warning(disable:4503) // (Compiler: Visual C++ 2010) Disable warning for too long decorated name
20 #pragma warning(disable:4702) // (Compiler: Visual C++) Disable warning for unreachable code (I don't know why some of these errors appear in the STANDARD LIBRARY headers with Visual Studio 2003!):
21 #pragma warning(disable:4244) // (Compiler: Visual C++) Conversion double->float
22 #pragma warning(disable:4305)
23 #pragma warning(disable:4308) // Disable warning for Eigen3 libs: negative integral converted to unsigned
24 #pragma warning(disable:4267)
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)
28 #pragma warning(disable:4308) // Disable for Eigen: negative integral constant converted to unsigned int
29 #if (_MSC_VER >= 1400 )
30 // MS believes they have the right to deprecate functions in the C++ Standard STL... disable their warnings:
31 #ifndef _SCL_SECURE_NO_WARNINGS
32 #define _SCL_SECURE_NO_WARNINGS
33 #endif
34 //#pragma warning(disable:4996) // Deprecated functions
35 // For the new secure library in VC++8
36 #if !defined(_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
37 #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
38 #endif
39 #endif
40#endif
41
42// Avoid conflicting declaration of max macro in windows headers
43#if defined(MRPT_OS_WINDOWS) && !defined(NOMINMAX)
44# define NOMINMAX
45# ifdef max
46# undef max
47# undef min
48# endif
49#endif



Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Wed Mar 22 20:12:58 UTC 2023