175 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
20 lines
756 B
C++
20 lines
756 B
C++
#pragma once
|
|
|
|
// Opt in only where the corresponding build target enforces this link.
|
|
// Other platforms must not acquire a dependency on an unvalidated ABI guard.
|
|
#if defined(__linux__) && (defined(__GNUC__) || defined(__clang__))
|
|
#include "gateway/object_updates.hpp"
|
|
|
|
// Include only in translation units that use LegacyObjectUpdate. The call is
|
|
// emitted in each such unit, so its layout must match the protocol parser at
|
|
// link time even when the unit consumes the record only through a destructor.
|
|
namespace {
|
|
struct ObjectUpdateLayoutGuard {
|
|
ObjectUpdateLayoutGuard() noexcept {
|
|
gateway::require_legacy_object_update_layout(nullptr);
|
|
}
|
|
};
|
|
[[maybe_unused]] const ObjectUpdateLayoutGuard object_update_layout_guard{};
|
|
} // namespace
|
|
#endif
|