FastLED 3.9.15
Loading...
Searching...
No Matches
not_null.cpp.hpp
Go to the documentation of this file.
1
2// not_null.cpp - Low-level assertion implementation for fl::not_null<T>
3//
4// Provides platform-specific assertion failure handling without depending on
5// fl/stl/assert.h (which might depend on not_null in the future, creating
6// circular dependencies).
7//
8// Platform-specific behavior matches the expectations documented in not_null.h:
9// - Desktop/Host: stderr output + abort()
10// - ESP32: Serial output via fl::println() + abort()
11// - WASM: Browser console warning + debugger breakpoint
12// - AVR: Minimal output due to memory constraints + abort()
14
15#include "fl/stl/not_null.h"
16#include "fl/stl/assert.h"
17
18namespace fl {
19namespace detail {
20
21// Low-level assertion failure handler for not_null
22// Called when a nullptr is detected during construction or assignment
23// Platform-specific implementation to avoid circular dependencies
24void not_null_assert_failed(const char* message) {
25 FL_ASSERT(false, message);
26}
27
28} // namespace detail
29} // namespace fl
#define FL_ASSERT(x, MSG)
Definition assert.h:6
void not_null_assert_failed(const char *message)
Compile-time linker keep-alive hook for a single fl::Bus.
Definition bus_traits.h:48
Base definition for an LED controller.
Definition crgb.hpp:179