From 01ff792d5d1830cfbef389d91d13f7cfebbbcbc9 Mon Sep 17 00:00:00 2001 From: Sean Parent Date: Tue, 12 Nov 2024 17:33:55 -0700 Subject: [PATCH] Fixing name lookup issue with operator<< and array_t. --- adobe/array.hpp | 5 +++++ adobe/manip.hpp | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/adobe/array.hpp b/adobe/array.hpp index bb3e91bb..2a3b87ab 100644 --- a/adobe/array.hpp +++ b/adobe/array.hpp @@ -35,6 +35,9 @@ inline void push_back(array_t& v, any_regular_t x) { v.push_back(std::move(x)); #ifdef ADOBE_STD_SERIALIZATION +// To be findable by ADL, the operator must be in the same namespace as `any_regular_t.` +namespace version_1 { + inline std::ostream& operator<<(std::ostream& out, const array_t& x) { out << begin_sequence; @@ -46,6 +49,8 @@ inline std::ostream& operator<<(std::ostream& out, const array_t& x) { return out; } +} // namespace version_1 + #endif /**************************************************************************************************/ diff --git a/adobe/manip.hpp b/adobe/manip.hpp index c99a11ef..acb77cea 100644 --- a/adobe/manip.hpp +++ b/adobe/manip.hpp @@ -18,13 +18,6 @@ #include -/* - REVISIT (sean-parent): As far as I can determine, this file does not use adobe/serializable.hpp - However, if it is not included here, the build fails for C++17 under MSVC only. I have not been - able to determine why this is the case. -*/ -#include - /**************************************************************************************************/ namespace adobe {