From 9944dbe184897d975b329e45aef89e1843861878 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 29 Sep 2026 12:14:14 +0300 Subject: [PATCH] Add an explicit specialization of container_hash::is_described_class for filesystem::path, because when reflection is available, path becomes a described class and the hash_value call becomes ambiguous --- include/boost/filesystem/path.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/boost/filesystem/path.hpp b/include/boost/filesystem/path.hpp index ba9a7a7b2..8d26de105 100644 --- a/include/boost/filesystem/path.hpp +++ b/include/boost/filesystem/path.hpp @@ -2419,6 +2419,22 @@ inline typename std::enable_if< #endif } +} // namespace filesystem + +namespace container_hash +{ + +// Since the hash_value overload above is low priority, and since +// `path` becomes a described class when reflection is available, +// we need to explicitly specialize is_described_class to avoid +// the ambiguity with hash_value for described classes + +template<> struct is_described_class: std::false_type {}; + +} // namespace container_hash + +namespace filesystem { + #else // !defined(BOOST_FILESYSTEM_DOXYGEN) //! \name path comparison