Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PragmaTwice committed Mar 22, 2023
1 parent 24606ac commit b6bd0b3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/common/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
#include <type_traits>
#include <utility>

template <typename Code>
struct StatusImpl {
Code code_;
std::string msg_;
};

class [[nodiscard]] Status {
public:
enum Code : unsigned char {
Expand Down Expand Up @@ -120,10 +126,7 @@ class [[nodiscard]] Status {
static constexpr const char* ok_msg = "ok";

private:
struct Impl {
Code code_;
std::string msg_;
};
using Impl = StatusImpl<Code>;

std::unique_ptr<Impl> impl_;

Expand Down

0 comments on commit b6bd0b3

Please sign in to comment.