Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #91156

Re: Visual C++ 2019 is having a hissy fit over these two lines of code

From Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups comp.lang.c++
Subject Re: Visual C++ 2019 is having a hissy fit over these two lines of code
Date 2023-07-19 22:51 -0700
Organization None to speak of
Message-ID <877cqvruyx.fsf@nosuchdomain.example.com> (permalink)
References <u9a76v$2hd12$1@dont-email.me> <u9a7al$2hd12$2@dont-email.me> <u9ae7q$2ibn8$1@dont-email.me> <u9agrn$2ir45$1@dont-email.me>

Show all headers | View raw


Lynn McGuire <lynnmcguire5@gmail.com> writes:
> On 7/19/2023 11:46 PM, Andrey Tarasevich wrote:
>> On 07/19/23 7:48 PM, Lynn McGuire wrote:
>>> You know, I should give the error code:
>> Compiles perfectly fine in my VS2019.
>> The first thought was that it was just another example of the
>> well-known conflict with Windows' own min/max macros. But regardless
>> of `NOMINMAX` state, this code compiled without any issues for me.
>
> Thanks !
>
> I can fix the problem by replacing the
> std::numeric_limits<size_t>::max(); with UINT_MAX.  But, that is a
> cheat.

Surely you mean SIZE_MAX, defined in <cstdint>.  (It's common for int to
be 32 bits and size_t 64 bits.)

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Visual C++ 2019 is having a hissy fit over these two lines of code Lynn McGuire <lynnmcguire5@gmail.com> - 2023-07-19 21:46 -0500
  Re: Visual C++ 2019 is having a hissy fit over these two lines of code Lynn McGuire <lynnmcguire5@gmail.com> - 2023-07-19 21:48 -0500
    Re: Visual C++ 2019 is having a hissy fit over these two lines of code Andrey Tarasevich <andreytarasevich@hotmail.com> - 2023-07-19 21:46 -0700
      Re: Visual C++ 2019 is having a hissy fit over these two lines of code Lynn McGuire <lynnmcguire5@gmail.com> - 2023-07-20 00:31 -0500
        Re: Visual C++ 2019 is having a hissy fit over these two lines of code Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-07-19 22:51 -0700
        Re: Visual C++ 2019 is having a hissy fit over these two lines of code Bonita Montero <Bonita.Montero@gmail.com> - 2023-07-20 16:11 +0200
          Re: Visual C++ 2019 is having a hissy fit over these two lines of code "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-07-20 12:57 -0700
            Re: Visual C++ 2019 is having a hissy fit over these two lines of code Bonita Montero <Bonita.Montero@gmail.com> - 2023-07-21 04:51 +0200
              Re: Visual C++ 2019 is having a hissy fit over these two lines of code "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2023-07-21 12:59 -0700
    Re: Visual C++ 2019 is having a hissy fit over these two lines of code "Alf P. Steinbach" <alf.p.steinbach@gmail.com> - 2023-07-20 09:04 +0200
      Re: Visual C++ 2019 is having a hissy fit over these two lines of code Pavel <pauldontspamtolk@removeyourself.dontspam.yahoo> - 2023-07-20 23:20 -0400
    Re: Visual C++ 2019 is having a hissy fit over these two lines of code Paavo Helde <eesnimi@osa.pri.ee> - 2023-07-20 11:22 +0300
      Re: Visual C++ 2019 is having a hissy fit over these two lines of code Lynn McGuire <lynnmcguire5@gmail.com> - 2023-07-20 14:05 -0500
        Re: Visual C++ 2019 is having a hissy fit over these two lines of code Paavo Helde <eesnimi@osa.pri.ee> - 2023-07-20 23:32 +0300
    Re: Visual C++ 2019 is having a hissy fit over these two lines of code Ralf Fassel <ralfixx@gmx.de> - 2023-07-20 15:19 +0200
  Re: Visual C++ 2019 is having a hissy fit over these two lines of code Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-07-20 01:53 -0700
    Re: Visual C++ 2019 is having a hissy fit over these two lines of code Lynn McGuire <lynnmcguire5@gmail.com> - 2023-07-20 14:19 -0500
      Re: Visual C++ 2019 is having a hissy fit over these two lines of code Paavo Helde <eesnimi@osa.pri.ee> - 2023-07-20 23:27 +0300

csiph-web