ISMRMRD
ISMRM Raw Data Format
Loading...
Searching...
No Matches
cpp98.h
1#ifndef ISMRMRD_CPP98_H
2#define ISMRMRD_CPP98_H
3
4#ifdef __cplusplus
5
6namespace ISMRMRD {
7 // begin and end are used in comparisons operators but are not
8 // consistently defined in all supported C++ versiona and platforms
9 template <typename T, size_t N>
10 T *begin(T (&array)[N]) {
11 return array;
12 }
13
14 template <typename T, size_t N>
15 T *end(T (&array)[N]) {
16 return array + N;
17 }
18}
19
20#if __cplusplus <= 199711L
21
22#include <stdint.h>
23
24#ifdef _MSC_VER
25#ifndef __func__
26#define __func__ __FUNCTION__
27#endif
28#endif
29
30#define __unaligned
31#define noexcept
32
33#ifndef nullptr
34#define nullptr NULL
35#endif
36
37namespace ISMRMRD {
38using ::int16_t;
39using ::int32_t;
40using ::int64_t;
41using ::int8_t;
42
43using ::uint16_t;
44using ::uint32_t;
45using ::uint64_t;
46using ::uint8_t;
47}
48#else
49#include <cstdint>
50namespace ISMRMRD {
51using std::int16_t;
52using std::int32_t;
53using std::int64_t;
54using std::int8_t;
55
56using std::uint16_t;
57using std::uint32_t;
58using std::uint64_t;
59using std::uint8_t;
60}
61
62#endif // __cplusplus <= 98
63#endif // __cplusplus
64#endif // ISMRMRD_CPP98_H