summaryrefslogtreecommitdiff
path: root/src/utilities/msvc.hpp
blob: a45105df86fedd7464ff677b69227f37eebfa5b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// =================================================================================================
// This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This
// project loosely follows the Google C++ styleguide and uses a tab-size of two spaces and a max-
// width of 100 characters per line.
//
// Author(s):
//   Cedric Nugteren <www.cedricnugteren.nl>
//
// This file provides macro's and definitions to make compilation work on Microsoft Visual Studio,
// in particular for versions older than 2015 with limited C++11 support.
// MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015)
// MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013)
// MSVC++ 11.0 _MSC_VER == 1700 (Visual Studio 2012)
// MSVC++ 10.0 _MSC_VER == 1600 (Visual Studio 2010)
// MSVC++ 9.0  _MSC_VER == 1500 (Visual Studio 2008)
//
// =================================================================================================

#ifndef CLBLAST_MSVC_HPP_
#define CLBLAST_MSVC_HPP_

namespace clblast {
// =================================================================================================
#ifdef _MSC_VER

// No support for constexpr prior to 2015. Note that this only works with constants, not with
// constexpr functions (unused in this project).
#if _MSC_VER < 1900
#define constexpr const
#endif

// _MSC_VER
#endif
// =================================================================================================
} // namespace clblast

// CLBLAST_MSVC_HPP_
#endif