Visual studio and macro NOMINMAX

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
simeon
Posts: 35
Joined: Fri, 2006-09-15, 09:25
Location: Bulgaria
Contact:

Visual studio and macro NOMINMAX

#1 Post by simeon »

Hello,
I noticed one small problem when I use dcmtk 3.6.2
There is a commit from Apr 25, 2016 about NOMINMAX, but I noticed in file dcmtk/ofstd/oflimits.h there are 3 uses of numeric_limits<>::max that have to be (numeric_limits<>::max)

template<typename T>
struct OFnumeric_limits : std::numeric_limits<T>
{
static const int max_digits10 = 0;
static inline T lowest() { return (std::numeric_limits<T>::min)(); }
};
template<>
struct OFnumeric_limits<float> : std::numeric_limits<float>
{
static const int max_digits10 = DCMTK_FLOAT_MAX_DIGITS10;
static inline float lowest() { return -(std::numeric_limits<float>::max)(); }
};
template<>
struct OFnumeric_limits<double> : std::numeric_limits<double>
{
static const int max_digits10 = DCMTK_DOUBLE_MAX_DIGITS10;
static inline double lowest() { return -(std::numeric_limits<double>::max)(); }
};
Last edited by simeon on Thu, 2017-09-07, 23:30, edited 1 time in total.
Simeon Antonov

J. Riesmeier
DCMTK Developer
Posts: 2541
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Visual studio and macro NOMINMAX

#2 Post by J. Riesmeier »

Thank you for the report. This issue has already been fixed: http://git.dcmtk.org/?p=dcmtk.git;a=com ... 2b741dc01b

simeon
Posts: 35
Joined: Fri, 2006-09-15, 09:25
Location: Bulgaria
Contact:

Re: Visual studio and macro NOMINMAX

#3 Post by simeon »

Thanks.
Simeon Antonov

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest