C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Callsite passed as template parameter

From: Sebastian Wittmeier <wittmeier_at_[hidden]>
Date: Thu, 16 Nov 2023 14:55:54 +0100
Hi Frederick, it is possible to create a static string buffer per call site as shown by Pavel. This can be really useful for embedded systems. Especially safety critical, here dynamic memory allocation is not allowed after the initialization of the program.   But it should be used deliberately and with care.   It probably is too much of a special case and too much of a professional feature to be further codified in the standard, beyond what is possible now. Especially as it is antithetical to how C++ normally works: e.g. RAII or you do not pay for, what you do not need. And it is not very obvious to the caller.   Best, Sebastian   -----Ursprüngliche Nachricht----- Von:Frederick Virchanza Gotham via Std-Proposals <std-proposals_at_[hidden]> Gesendet:Do 16.11.2023 12:39 Betreff:Re: [std-proposals] Callsite passed as template parameter An:Jonathan Wakely <cxx_at_[hidden]>; CC:Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>; std-proposals_at_[hidden]; On Thu, Nov 16, 2023 at 10:19 AM Jonathan Wakely <cxx_at_[hidden]> wrote: > > OK, but not suitable for the C++ standard. This isn't a mailing list for sharing your cool ideas. Are you saying that the C++ standard shouldn't accommodate microcontrollers, or that the C++ standard shouldn't accommodate micro-optimisation?  

Received on 2023-11-16 13:55:56