Fix Variant debug.
GitOrigin-RevId: 9fe51b6ca5d069058a2d98bc9b111b8693ae6df0
This commit is contained in:
parent
082a132edc
commit
e4c8b8ff3b
@ -170,7 +170,11 @@ class Variant {
|
|||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
void init_empty(T &&t) {
|
void init_empty(T &&t) {
|
||||||
CHECK(offset_ == npos) << offset_ << ' ' << typeid(T).name() << ' ' << typeid(*this).name();
|
CHECK(offset_ == npos) << offset_
|
||||||
|
#if TD_CLANG || TD_GCC
|
||||||
|
<< __PRETTY_FUNCTION__
|
||||||
|
#endif
|
||||||
|
;
|
||||||
offset_ = offset<T>();
|
offset_ = offset<T>();
|
||||||
new (&get<T>()) std::decay_t<T>(std::forward<T>(t));
|
new (&get<T>()) std::decay_t<T>(std::forward<T>(t));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user