From 87719828fb264aa4d8d1bad9aed8b392fba8ffee Mon Sep 17 00:00:00 2001 From: Ruben Perez Date: Mon, 4 Nov 2024 22:37:11 +0100 Subject: [PATCH] inline namespaces to prevent ODR violations --- test/integration/test/snippets/overview.cpp | 2 ++ test/integration/test/snippets/sql_formatting.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/test/integration/test/snippets/overview.cpp b/test/integration/test/snippets/overview.cpp index e10b738ed..3fbed8d2b 100644 --- a/test/integration/test/snippets/overview.cpp +++ b/test/integration/test/snippets/overview.cpp @@ -56,6 +56,7 @@ asio::awaitable dont_run(mysql::any_connection& conn) } #endif +inline namespace overview { //[overview_static_struct // This must be placed at namespace scope. // Should contain a member for each field of interest present in our query. @@ -68,6 +69,7 @@ struct employee std::string last_name; }; //] +} // namespace overview namespace { diff --git a/test/integration/test/snippets/sql_formatting.cpp b/test/integration/test/snippets/sql_formatting.cpp index 4c2b2b385..26ccd7769 100644 --- a/test/integration/test/snippets/sql_formatting.cpp +++ b/test/integration/test/snippets/sql_formatting.cpp @@ -84,6 +84,7 @@ std::string compose_select_query( } // namespace +inline namespace sql_formatting { //[sql_formatting_formatter_specialization // We want to add formatting support for employee struct employee @@ -92,6 +93,9 @@ struct employee std::string last_name; std::string company_id; }; +//<- +} // namespace sql_formatting +//-> namespace boost { namespace mysql {