Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions examples/forms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ add_executable(morph_forms_demo main.cpp)
target_link_libraries(morph_forms_demo PRIVATE morph::morph)
apply_warnings(morph_forms_demo)

# main.cpp instantiates schema/rule templates over every demo action type;
# under MSVC Debug (more sections per symbol than Release: no /Og folding,
# full /Zi debug info) that pushes main.cpp.obj's COFF section count past the
# 32-bit SN_LOFF format's limit -- MSVC then aborts with C1128 ("number of
# sections exceeded object file format limit"). /bigobj switches the object
# file to the extended section-count format; harmless on Release and on
# other compilers, so it is unconditional for this target.
target_compile_options(morph_forms_demo PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/bigobj>
)

if(DEFINED AF_SANITIZER)
apply_sanitizers(morph_forms_demo ${AF_SANITIZER})
endif()
Expand Down
2 changes: 1 addition & 1 deletion include/morph/core/wire.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ namespace detail {
/// anywhere serializes to JSON the peer's `decode` then throws on.
/// - **Silent corruption.** Worse, the writer's chunked fast path mangles such a
/// byte outright once the string also contains an escaped character: with a
/// `\\` or `"` earlier in the same string, a 0x0B at certain offsets is written
/// backslash or double-quote character earlier in the same string, a 0x0B at certain offsets is written
/// as *two* 0x00 bytes. The payload is destroyed before it reaches the wire,
/// so no amount of post-processing on the serialized form can recover it —
/// the escaping has to happen inside the writer.
Expand Down
5 changes: 3 additions & 2 deletions include/morph/forms/forms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -991,8 +991,9 @@ template <typename V, typename A, RuleLiteral L>
return Equals<V, A, L>{field, std::move(literal)};
}

/// @brief `equals` overload for a string-literal argument (`equals(&A::code,
/// "X")`), so callers do not have to spell `std::string{"X"}` explicitly.
/// @brief `equals` overload for a string-literal argument
/// (`equals(&A::code, "X")`), so callers do not have to spell
/// `std::string{"X"}` explicitly.
///
/// The literal is captured inline as a `detail::LiteralString`, not copied into a
/// `std::string`, so the resulting node stays a literal type and the documented
Expand Down
Loading