FastLED
3.10.8
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
18
namespace
fl
{
19
namespace
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
24
void
not_null_assert_failed
(
const
char
* message)
FL_NO_EXCEPT
{
25
FL_UNUSED
(message);
// FL_ASSERT compiles to nothing in some builds
26
FL_ASSERT
(
false
, message);
27
}
28
29
}
// namespace detail
30
}
// namespace fl
FL_ASSERT
#define FL_ASSERT(x, MSG)
Definition
assert.h:6
assert.h
FL_UNUSED
#define FL_UNUSED(x)
Definition
compiler_control.h:905
fl::detail::not_null_assert_failed
void not_null_assert_failed(const char *message) FL_NO_EXCEPT
Definition
not_null.cpp.hpp:24
fl::detail
Compile-time linker keep-alive hook for a single fl::Bus.
Definition
bus_info.h:57
fl::FL_NO_EXCEPT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition
blur.h:186
fl
Base definition for an LED controller.
Definition
crgb.hpp:179
not_null.h
fl
stl
not_null.cpp.hpp
Generated on Sun Oct 18 2026 00:56:53 for FastLED by
1.13.2