Revert "Back out some of the 'explicits', proving that I have no idea what I'm doing here."

This reverts commit 860c7a990613a3c273d544739a9d2d44b22abc01.
pull/911/head
Jesse Vincent 4 years ago committed by Gergely Nagy
parent b8ec42e619
commit 2baef3e871
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -85,7 +85,7 @@ struct ArrayLikeStorage<StoredType__, true /* is of appropriate type */> {
public: public:
constexpr ArrayLikeStorage(StoredType__ entry) explicit constexpr ArrayLikeStorage(StoredType__ entry)
: entry_(entry) : entry_(entry)
{} {}
@ -103,7 +103,7 @@ struct ArrayLikeStorage<StoredType__, false /* not of appropriate type */> {
public: public:
template<typename AnyType__> template<typename AnyType__>
constexpr ArrayLikeStorage(AnyType__/* non-matching entity */) {} explicit constexpr ArrayLikeStorage(AnyType__/* non-matching entity */) {}
static constexpr uint8_t n_entries = 0; static constexpr uint8_t n_entries = 0;

@ -35,7 +35,7 @@ class KeymapAdaptor {
static constexpr uint8_t n_layers = _n_layers; static constexpr uint8_t n_layers = _n_layers;
static constexpr uint8_t layer_size = _layer_size; static constexpr uint8_t layer_size = _layer_size;
constexpr KeymapAdaptor(const Key(&keymap)[_n_layers][_layer_size]) explicit constexpr KeymapAdaptor(const Key(&keymap)[_n_layers][_layer_size])
: keymap_{keymap} : keymap_{keymap}
{} {}
@ -119,7 +119,7 @@ class EmptyKeymapAccumulationHelper {
public: public:
constexpr EmptyKeymapAccumulationHelper(const _Accumulation &op) explicit constexpr EmptyKeymapAccumulationHelper(const _Accumulation &op)
: op_{op} : op_{op}
{} {}
@ -147,7 +147,7 @@ struct NumKeysEqual {
typedef uint8_t ResultType; typedef uint8_t ResultType;
static constexpr ResultType init_value = 0; static constexpr ResultType init_value = 0;
constexpr NumKeysEqual(Key k) : k_{k} {} explicit constexpr NumKeysEqual(Key k) : k_{k} {}
constexpr ResultType apply(Key test_key, ResultType r) const { constexpr ResultType apply(Key test_key, ResultType r) const {
return (test_key == k_) ? r + 1 : r; return (test_key == k_) ? r + 1 : r;
@ -163,7 +163,7 @@ struct HasKey {
typedef bool ResultType; typedef bool ResultType;
static constexpr ResultType init_value = false; static constexpr ResultType init_value = false;
constexpr HasKey(Key k) : k_{k} {} explicit constexpr HasKey(Key k) : k_{k} {}
constexpr ResultType apply(Key test_key, ResultType r) const { constexpr ResultType apply(Key test_key, ResultType r) const {
return (test_key == k_) ? true : r; return (test_key == k_) ? true : r;

Loading…
Cancel
Save