C++ Logo

std-proposals

Advanced search

Re: [std-proposals] interceptor functions (tested and working on x86_64)

From: Thiago Macieira <thiago_at_[hidden]>
Date: Tue, 28 Apr 2026 10:02:34 -0700
On Monday, 27 April 2026 14:42:48 Pacific Daylight Time Frederick Virchanza
Gotham via Std-Proposals wrote:
> Consider intercepting a call to a function such as 'printf'.

What could possibly be the use-case for intercepting printf? How do you even
know what the mangling of "printf" is (hint: it's not `printf` everywhere)?
And why should the Standard ever consider allowing intercepting standard
library functions?

Do you really want to pursue this as a Standard change?

I think your idea has value and merit, but as a compiler extension, not as a
Standard feature.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Data Center - Platform & Sys. Eng.

Received on 2026-04-28 17:02:38