Skip to content

Commit

Permalink
resolve - Fix a gcc compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
thepowersgang committed Dec 9, 2023
1 parent 200bfc8 commit 91a9325
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 9 additions & 0 deletions src/resolve/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@
#include <expand/cfg.hpp>
#include <synext_macro.hpp>

::std::ostream& operator<<(::std::ostream& os, ResolveNamespace ns) {
switch(ns) {
case ResolveNamespace::Namespace: return os << "Namespace";
case ResolveNamespace::Value: return os << "Value";
case ResolveNamespace::Macro: return os << "Macro";
}
return os << "?";
}

namespace {

ResolveItemRef_Type as_Namespace(ResolveItemRef ir) {
Expand Down
9 changes: 1 addition & 8 deletions src/resolve/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,7 @@ enum class ResolveNamespace
Value,
Macro,
};
static inline ::std::ostream& operator<<(::std::ostream& os, ResolveNamespace ns) {
switch(ns) {
case ResolveNamespace::Namespace: return os << "Namespace";
case ResolveNamespace::Value: return os << "Value";
case ResolveNamespace::Macro: return os << "Macro";
}
return os << "?";
}
extern ::std::ostream& operator<<(::std::ostream& os, ResolveNamespace ns);

/// <summary>
/// Obtain a reference to the module pointed to by `path` (relative to `base_path`)
Expand Down

0 comments on commit 91a9325

Please sign in to comment.