Browse Source

fix: `explicit` limit for class convert

master
Dnomd343 2 years ago
parent
commit
a8b2d7a57e
  1. 2
      src/klotski/common_code/common_code.h
  2. 2
      src/klotski/raw_code/raw_code.h
  3. 2
      src/klotski/short_code/short_code.h

2
src/klotski/common_code/common_code.h

@ -68,8 +68,8 @@ namespace klotski {
static bool check(uint64_t common_code);
/// Operators of CommonCode
constexpr operator uint64_t() const { return code; }
bool operator==(const CommonCode &common_code) const;
constexpr explicit operator uint64_t() const { return code; }
friend std::ostream& operator<<(std::ostream &out, const CommonCode &self);
/// Export functions

2
src/klotski/raw_code/raw_code.h

@ -50,7 +50,7 @@ namespace klotski {
/// Operators of RawCode
bool operator==(const RawCode &raw_code) const;
constexpr operator uint64_t() const { return code; }
constexpr explicit operator uint64_t() const { return code; }
friend std::ostream& operator<<(std::ostream &out, const RawCode &self);
/// Export functions

2
src/klotski/short_code/short_code.h

@ -40,8 +40,8 @@ namespace klotski {
static bool check(uint32_t short_code);
/// Operators of ShortCode
constexpr operator uint32_t() const { return code; }
bool operator==(const ShortCode &short_code) const;
constexpr explicit operator uint32_t() const { return code; }
friend std::ostream& operator<<(std::ostream &out, const ShortCode &self);
/// Export functions

Loading…
Cancel
Save