Commit 27859437 authored by Po-Yen, Chen's avatar Po-Yen, Chen
Browse files

Make friend function hidden

parent 27876602
......@@ -30,6 +30,18 @@ class ProfilerOperationRegistry final
std::map<std::string_view, Entry> entries_;
friend std::ostream& operator<<(std::ostream& stream, const ProfilerOperationRegistry& registry)
{
stream << "{\n";
for(auto& [name, entry] : registry.entries_)
{
stream << "\t" << name << ": " << entry.description_ << "\n";
}
stream << "}";
return stream;
}
public:
static ProfilerOperationRegistry& GetInstance()
{
......@@ -56,18 +68,6 @@ class ProfilerOperationRegistry final
std::forward_as_tuple(description, std::move(operation)))
.second;
}
friend std::ostream& operator<<(std::ostream& stream, const ProfilerOperationRegistry& registry)
{
stream << "{\n";
for(auto& [name, entry] : registry.entries_)
{
stream << "\t" << name << ": " << entry.description_ << "\n";
}
stream << "}";
return stream;
}
};
#define PP_CONCAT(x, y) PP_CONCAT_IMPL(x, y)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment