|
|
@@ -24,7 +24,7 @@ inline std::string to_string(std::string_view str) { return std::string(str); }
|
|
|
template <typename T> std::string to_string(T const & elem) {
|
|
|
if constexpr (detail::is_dereferencable_v<T>) {
|
|
|
using ::serializer::to_string;
|
|
|
- return elem ? "nil" : to_string(*elem);
|
|
|
+ return elem ? to_string(*elem) : "nil";
|
|
|
} else if constexpr (std::is_enum_v<T>) {
|
|
|
constexpr auto type =
|
|
|
magic_enum::as_flags<magic_enum::detail::is_flags_v<T>>;
|