]> git.hungrycats.org Git - bees/commit
chatter, fd: drop unused ChatterTraits specializations
authorZygo Blaxell <bees@furryterror.org>
Tue, 28 Apr 2026 21:25:38 +0000 (17:25 -0400)
committerZygo Blaxell <bees@furryterror.org>
Sat, 2 May 2026 03:48:57 +0000 (23:48 -0400)
commit45b5e0552e07fec64fff73a47b064d92a8f4f367
tree4e46fb1969a61f5b1a70f09416d50fc5f65fe524
parentb0638951ee13f780ca5b06b63c31eb93b9f2ef85
chatter, fd: drop unused ChatterTraits specializations

Remove three template specializations that turned out to be dead
code on inspection:

  - ChatterTraits<const Argument *> in chatter.h: the pointer
    pretty-print that emitted "(pointer to TypeName)(0xaddr)".
    A link-time audit (extern undefined symbol inserted in the
    template body, full build) confirmed no translation unit in
    either the library or its consumers instantiates this
    specialization.  The format had not been used anywhere in
    practice.

  - ChatterTraits<const char *> in chatter.h: existed only to
    override the pointer specialization for C-strings (which would
    otherwise pretty-print every literal as "(pointer to char)
    (0xaddr)").  Once the pointer specialization is gone, the
    primary ChatterTraits<T> template's `c.get_os() << arg` falls
    through to `ostream::operator<<(const char *)`, producing the
    same correct output without a dedicated specialization.

  - ChatterTraits<Fd> in fd.cc: transitively dead.  Its body
    contained `c << &fd` where `&fd` has type `const Fd *`, which
    would have triggered the now-removed pointer specialization
    had any caller used it.  The author's own comment
    (`// XXX: necessary?  useful?`) reflected the same uncertainty;
    the audit confirmed the answer.  Callers that need to print
    an Fd in a log message can use Fd::operator int() for the
    file-descriptor number or name_fd(const Fd&) for the resolved
    path — both already in the public API.

Three template specializations removed; the primary ChatterTraits<T>
template that delegates to `ostream::operator<<` remains as the
single dispatch path.  No behavior change for any existing caller
(audit guarantees these specializations were unreachable).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
include/crucible/chatter.h
lib/fd.cc