On Wed, 23 Oct 2024 at 10:55, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:
On Wed, 23 Oct 2024 at 12:01, Jonathan Wakely via SG15
<sg15@lists.isocpp.org> wrote:
> My use case for constexpr_print is for "interactive" development during compile-edit-debug cycles. You add some prints, but then take them out again once you've understood how the code is compiling. So IMHO it really doesn't matter how that output is displayed. It could even go to a separate file.

Thanks, there's the answer to my pondering how the compiler could
control the output of a constexpr_print.

c++ -fconstexpr-print-output-file=-
c++ -fconstexpr-print-output-file=myprintzlog.txt


Yeah, and that output could be completely disabled by default, if dumping unstructured messages to a file/terminal is not a fit for the compiler's typically high quality user experience. Document that you need to use something like -fconstexpr-print-spew to enable those messages, but that the output might be interleaved with the usual diagnostics and might not be easily parsed by automated tooling.

There seem to be several ways to support this in *some* form without compromising how compilers currently present output to users.

(I'm amused that Aaron said the only form he wants to support for Clang is just print, no bells and whistles, but Corentin said the opposite and suggested dropping the "just print" form, also for Clang :-)