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


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

Re: constexpr was created why?

From Muttley@dastardlyhq.com
Newsgroups comp.lang.c++
Subject Re: constexpr was created why?
Date 2022-07-20 08:23 +0000
Organization Aioe.org NNTP Server
Message-ID <tb8e2n$1o26$1@gioia.aioe.org> (permalink)
References <7e7658ec-0e5a-43b5-8d81-ed2157f8415dn@googlegroups.com> <tb7kea$1fr6$1@gioia.aioe.org>

Show all headers | View raw


On Wed, 20 Jul 2022 03:06:18 +0200
Manfred <noname@add.invalid> wrote:
>On 7/20/2022 12:25 AM, gdo...@gmail.com wrote:
>> is this one of those things where the committee had nothing better to do?
>ok, maybe I haven't got to the point where I see the demand for such, but I
>will be open-minded and use it when I see an opportunity.
>> 
>> prevents ..., more intuitive ..., easier to type than ..., more expressive
>than ..., solves the problem of ..., well I'm sure I'll see all of that at
>some point.
>
>Short answer: to facilitate compile time evaluation.

IME ever constexpr I've seen could have been evaluated by the developer
directly and just been a hard coded const/macro. Constexprs are generally a 
solution looking for a problem.

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


Thread

constexpr was created why? "gdo...@gmail.com" <gdotone@gmail.com> - 2022-07-19 15:25 -0700
  Re: constexpr was created why? Mr Flibble <flibble@reddwarf.jmc.corp> - 2022-07-19 23:56 +0100
    Re: constexpr was created why? "gdo...@gmail.com" <gdotone@gmail.com> - 2022-07-19 17:18 -0700
      Re: constexpr was created why? Mr Flibble <flibble@reddwarf.jmc.corp> - 2022-07-20 01:21 +0100
  Re: constexpr was created why? Manfred <noname@add.invalid> - 2022-07-20 03:06 +0200
    Re: constexpr was created why? Bonita Montero <Bonita.Montero@gmail.com> - 2022-07-20 03:24 +0200
    Re: constexpr was created why? Muttley@dastardlyhq.com - 2022-07-20 08:23 +0000
      Re: constexpr was created why? David Brown <david.brown@hesbynett.no> - 2022-07-20 13:04 +0200
        Re: constexpr was created why? Muttley@dastardlyhq.com - 2022-07-20 15:12 +0000
          Re: constexpr was created why? Öö Tiib <ootiib@hot.ee> - 2022-07-20 21:00 -0700
  Re: constexpr was created why? David Brown <david.brown@hesbynett.no> - 2022-07-20 09:27 +0200
  Re: constexpr was created why? Juha Nieminen <nospam@thanks.invalid> - 2022-07-20 09:46 +0000

csiph-web