friend class Extendable<T>;
constexpr Extension(std::size_t id) : id_(id) {}
public:
- constexpr Extension() : id_(INVALID_ID) {}
+ explicit constexpr Extension() : id_(INVALID_ID) {}
std::size_t id() const { return id_; }
bool valid() { return id_ != INVALID_ID; }
};
extension_set(rank.id(), value, use_dtor);
}
-public:
// Convenience extension access when the type has a associated EXTENSION ID:
template<class U> U* extension() { return extension<U>(U::EXTENSION_ID); }
template<class U> void extension_set(U* p) { extension_set<U>(U::EXTENSION_ID, p); }