From 059dada584c1516571b0ade3cfb1f091cdca700b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 5 Nov 2015 07:20:29 +0200 Subject: Remove unnecessary comparison operator overload While normally harmless, it causes ambiguity if we use string mapping that does not derive from std::string (e.g., to work around VC++ DLL export mess). --- libxsd/xsd/cxx/tree/elements.hxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libxsd/xsd') diff --git a/libxsd/xsd/cxx/tree/elements.hxx b/libxsd/xsd/cxx/tree/elements.hxx index b36f4fd..8a6c433 100644 --- a/libxsd/xsd/cxx/tree/elements.hxx +++ b/libxsd/xsd/cxx/tree/elements.hxx @@ -1838,11 +1838,18 @@ namespace xsd return s < table_[i]; } + // This overload shouldn't be necessary according to the standard + // and removing it doesn't appear to trip any old compilers that + // we still support. But let's keeps preprocessed-out until we + // go C++11-only. + // +#if 0 bool operator() (std::size_t i, std::size_t j) const { return std::basic_string (table_[i]) < table_[j]; } +#endif private: const C* const* table_; -- cgit v1.1