Main MRPT website > C++ reference for MRPT 1.5.9
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:4714) // force inlined -> not inlined (in Eigen3)
22  #pragma warning(disable:4267) // truncation size_t -> type
23  #pragma warning(disable:4290) // Visual C++ does not implement decl. specifiers: throw(A,B,...)
24  #pragma warning(disable:4251) // Visual C++ 2003+ warnings on STL classes when exporting to DLL...
25  #pragma warning(disable:4275) // DLL export class derived from STL
26  #pragma warning(disable:4251) // Warnings are emited even if a DLL export class contains a private STL field (?)
27  #if (_MSC_VER >= 1400 )
28  // MS believes they have the right to deprecate functions in the C++ Standard STL... disable their warnings:
29  #ifndef _SCL_SECURE_NO_WARNINGS
30  #define _SCL_SECURE_NO_WARNINGS
31  #endif
32  // For the new secure library in VC++8
33  #if !defined(_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
34  #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
35  #endif
36  #endif
37 #endif
38 
39 // Avoid conflicting declaration of max macro in windows headers
40 #if defined(MRPT_OS_WINDOWS) && !defined(NOMINMAX)
41 # define NOMINMAX
42 # ifdef max
43 # undef max
44 # undef min
45 # endif
46 #endif



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020