diff --git a/arangod/Indexes/Index.cpp b/arangod/Indexes/Index.cpp index 26ea5f740c..487191245e 100644 --- a/arangod/Indexes/Index.cpp +++ b/arangod/Indexes/Index.cpp @@ -41,7 +41,6 @@ #include using namespace arangodb; -using namespace arangodb::basics; Index::Index( TRI_idx_iid_t iid, arangodb::LogicalCollection* collection, diff --git a/lib/Basics/AttributeNameParser.cpp b/lib/Basics/AttributeNameParser.cpp index ce1e2d57be..83229d3d7c 100644 --- a/lib/Basics/AttributeNameParser.cpp +++ b/lib/Basics/AttributeNameParser.cpp @@ -205,3 +205,63 @@ bool arangodb::basics::TRI_AttributeNamesHaveExpansion( } return false; } + +//////////////////////////////////////////////////////////////////////////////// +/// @brief append the attribute name to an output stream +//////////////////////////////////////////////////////////////////////////////// + +std::ostream& operator<<(std::ostream& stream, + arangodb::basics::AttributeName const* name) { + stream << name->name; + if (name->shouldExpand) { + stream << "[*]"; + } + return stream; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief append the attribute name to an output stream +//////////////////////////////////////////////////////////////////////////////// + +std::ostream& operator<<(std::ostream& stream, + arangodb::basics::AttributeName const& name) { + stream << name.name; + if (name.shouldExpand) { + stream << "[*]"; + } + return stream; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief append the attribute names to an output stream +//////////////////////////////////////////////////////////////////////////////// + +std::ostream& operator<<( + std::ostream& stream, + std::vector const* attributes) { + size_t const n = attributes->size(); + for (size_t i = 0; i < n; ++i) { + if (i > 0) { + stream << "."; + } + stream << attributes[i]; + } + return stream; +} + +//////////////////////////////////////////////////////////////////////////////// +/// @brief append the attribute names to an output stream +//////////////////////////////////////////////////////////////////////////////// + +std::ostream& operator<<( + std::ostream& stream, + std::vector const& attributes) { + size_t const n = attributes.size(); + for (size_t i = 0; i < n; ++i) { + if (i > 0) { + stream << "."; + } + stream << attributes[i]; + } + return stream; +} diff --git a/lib/Basics/AttributeNameParser.h b/lib/Basics/AttributeNameParser.h index fd5a0e737a..096ed80d99 100644 --- a/lib/Basics/AttributeNameParser.h +++ b/lib/Basics/AttributeNameParser.h @@ -85,18 +85,6 @@ struct AttributeName { static bool namesMatch(std::vector const&, std::vector const&); - - friend std::ostream& operator<<(std::ostream& stream, arangodb::basics::AttributeName const* name) { - stream << name->name; - if (name->shouldExpand) { - stream << "[*]"; - } - return stream; - } - - friend std::ostream& operator<<(std::ostream& stream, arangodb::basics::AttributeName const& name) { - return operator<<(stream, &name); - } }; //////////////////////////////////////////////////////////////////////////////// @@ -138,20 +126,14 @@ void TRI_AttributeNamesJoinNested(std::vector const& input, //////////////////////////////////////////////////////////////////////////////// bool TRI_AttributeNamesHaveExpansion(std::vector const& input); - -static inline std::ostream& operator<<(std::ostream& stream, - std::vector const& attributes) { - size_t const n = attributes.size(); - for (size_t i = 0; i < n; ++i) { - if (i > 0) { - stream << "."; - } - stream << attributes[i]; - } - return stream; +} } -} -} +std::ostream& operator<<(std::ostream&, arangodb::basics::AttributeName const*); +std::ostream& operator<<(std::ostream&, arangodb::basics::AttributeName const&); +std::ostream& operator<<(std::ostream&, + std::vector const*); +std::ostream& operator<<(std::ostream&, + std::vector const&); #endif diff --git a/lib/Logger/LoggerStream.h b/lib/Logger/LoggerStream.h index 6f0cfa2172..b3d2876575 100644 --- a/lib/Logger/LoggerStream.h +++ b/lib/Logger/LoggerStream.h @@ -78,13 +78,7 @@ class LoggerStream { template friend LoggerStream& operator<<(LoggerStream& out, T const& obj) { - out._out << obj; - return out; - } - - template - friend LoggerStream& operator<<(LoggerStream& out, T&& obj) { - out._out << obj; + out << obj; return out; }