Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't define member functions inside a nested namespace #113

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/substrait/textplan/SymbolTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "substrait/textplan/Location.h"
#include "substrait/textplan/StructuredSymbolData.h"

namespace io::substrait::textplan {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would changing this to three separate namespace definitions did the problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard to find documentation about this (it's sort of a bug-in-limbo...). I'm not at my workstation at the moment so i can't give an answer now, but my hunch would be no.

using namespace io::substrait::textplan;

const std::string& symbolTypeName(SymbolType type) {
static std::vector<std::string> names = {
Expand Down Expand Up @@ -60,13 +60,17 @@ const SymbolInfo SymbolInfo::kUnknown = {
std::nullopt,
std::nullopt};

bool operator==(const SymbolInfo& left, const SymbolInfo& right) {
bool io::substrait::textplan::operator==(
const SymbolInfo& left,
const SymbolInfo& right) {
return (left.name == right.name) &&
(left.sourceLocation == right.sourceLocation) &&
(left.type == right.type);
}

bool operator!=(const SymbolInfo& left, const SymbolInfo& right) {
bool io::substrait::textplan::operator!=(
const SymbolInfo& left,
const SymbolInfo& right) {
return !(left == right);
}

Expand Down Expand Up @@ -288,5 +292,3 @@ std::string SymbolTable::toDebugString() const {
}
return result.str();
}

} // namespace io::substrait::textplan
Loading