Skip to content

Commit

Permalink
feat: overload stream insertion operator(<<) to support formatting by…
Browse files Browse the repository at this point in the history
… {fmt}
  • Loading branch information
empiredan committed Nov 7, 2022
1 parent 3b586d6 commit 101aee5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/utils/threadpool_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#pragma once

#include <ostream>

#include "ports.h"

namespace dsn {
Expand All @@ -49,6 +51,11 @@ class threadpool_code
static int max();
static bool is_exist(const char *name);

friend std::ostream &operator<<(std::ostream &os, const threadpool_code &pool_code)
{
return os << pool_code.to_string();
}

private:
int _internal_code;
};
Expand Down

0 comments on commit 101aee5

Please sign in to comment.