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
7 changes: 7 additions & 0 deletions doc/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,10 @@ prints, natively, on wasm32-wasip2, on wasm32-wasip3 and with Emscripten:
----
include::{examples}/config_quick_start.expected[]
----

Built with `exception-handling=off`, the same program prints:

[listing]
----
include::{examples}/config_quick_start_no_exceptions.expected[]
----
6 changes: 5 additions & 1 deletion example/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ import webcpp ;

webcpp.targets native wasip2 wasip3 emscripten ;

webcpp.example config_quick_start.cpp ;
# Each exception mode keeps the quick start's actual output. Select the
# matching example without changing the exception mode the build requested.
webcpp.example config_quick_start.cpp : <exception-handling>off:<build>no ;
webcpp.example config_quick_start_no_exceptions.cpp
: <exception-handling>on:<build>no ;
9 changes: 9 additions & 0 deletions example/config_quick_start_no_exceptions.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) 2026 WebCpp.org
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

// The same quick start, built without exceptions and checked against its own recorded output.
// NOLINTNEXTLINE(bugprone-suspicious-include)
#include "config_quick_start.cpp"
1 change: 1 addition & 0 deletions example/config_quick_start_no_exceptions.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
my_library: exceptions off
Loading