From 0594ebcdd20553cbc09f19f9f2975aadf9cba244 Mon Sep 17 00:00:00 2001 From: dacharyc Date: Mon, 6 May 2024 14:20:42 -0400 Subject: [PATCH] Add missing namespace to quick start snippet --- examples/cpp/sync/quick-start.cpp | 4 +++- source/examples/generated/cpp/quick-start.snippet.model.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/cpp/sync/quick-start.cpp b/examples/cpp/sync/quick-start.cpp index 8434258442..b7b3063219 100644 --- a/examples/cpp/sync/quick-start.cpp +++ b/examples/cpp/sync/quick-start.cpp @@ -20,8 +20,10 @@ struct Local_Todo { std::string status; }; REALM_SCHEMA(Local_Todo, _id, name, status); +} // namespace realm // :snippet-start: model +namespace realm { struct Sync_Todo { realm::primary_key _id{realm::object_id::generate()}; std::string name; @@ -31,8 +33,8 @@ struct Sync_Todo { std::string ownerId; }; REALM_SCHEMA(Sync_Todo, _id, name, status, ownerId); -// :snippet-end: } // namespace realm +// :snippet-end: TEST_CASE("non-sync quick start", "[realm][write]") { auto relative_realm_path_directory = "quick-start/"; diff --git a/source/examples/generated/cpp/quick-start.snippet.model.cpp b/source/examples/generated/cpp/quick-start.snippet.model.cpp index c028485787..cb29567e60 100644 --- a/source/examples/generated/cpp/quick-start.snippet.model.cpp +++ b/source/examples/generated/cpp/quick-start.snippet.model.cpp @@ -1,3 +1,4 @@ +namespace realm { struct Todo { realm::primary_key _id{realm::object_id::generate()}; std::string name; @@ -7,3 +8,4 @@ struct Todo { std::string ownerId; }; REALM_SCHEMA(Todo, _id, name, status, ownerId); +} // namespace realm