From 5f931c45233cd384870fe5fbd97cf736f62003a0 Mon Sep 17 00:00:00 2001 From: Steven Lovegrove Date: Thu, 29 Feb 2024 15:12:57 -0800 Subject: [PATCH 1/2] Close unmatched endif --- gtsam/base/std_optional_serialization.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gtsam/base/std_optional_serialization.h b/gtsam/base/std_optional_serialization.h index 444c317033..7e30ae4d33 100644 --- a/gtsam/base/std_optional_serialization.h +++ b/gtsam/base/std_optional_serialization.h @@ -8,12 +8,12 @@ * Functionality to serialize std::optional to boost::archive * Inspired from this PR: https://github.com/boostorg/serialization/pull/163 * ---------------------------------------------------------------------------- */ +#pragma once // Defined only if boost serialization is enabled #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION // Only for old boost #if BOOST_VERSION < 108000 -#pragma once #include #include @@ -107,5 +107,6 @@ void serialize(Archive& ar, std::optional& t, const unsigned int version) { } // namespace serialization } // namespace boost -#endif -#endif +#endif // BOOST_VERSION < 108400 +#endif // BOOST_VERSION < 108000 +#endif // GTSAM_ENABLE_BOOST_SERIALIZATION From 4947a101329772fbe530eb773d232ce3e5d5c744 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sun, 3 Mar 2024 10:20:29 -0500 Subject: [PATCH 2/2] remove macro block for boost version 108000 --- gtsam/base/std_optional_serialization.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/gtsam/base/std_optional_serialization.h b/gtsam/base/std_optional_serialization.h index 7e30ae4d33..7e0f2e844a 100644 --- a/gtsam/base/std_optional_serialization.h +++ b/gtsam/base/std_optional_serialization.h @@ -12,8 +12,6 @@ // Defined only if boost serialization is enabled #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION -// Only for old boost -#if BOOST_VERSION < 108000 #include #include @@ -108,5 +106,4 @@ void serialize(Archive& ar, std::optional& t, const unsigned int version) { } // namespace serialization } // namespace boost #endif // BOOST_VERSION < 108400 -#endif // BOOST_VERSION < 108000 #endif // GTSAM_ENABLE_BOOST_SERIALIZATION