Fix Variant debug.

GitOrigin-RevId: 9fe51b6ca5d069058a2d98bc9b111b8693ae6df0
This commit is contained in:
levlam 2018-10-26 17:57:30 +03:00
parent 082a132edc
commit e4c8b8ff3b

View File

@ -170,7 +170,11 @@ class Variant {
template <class 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>();
new (&get<T>()) std::decay_t<T>(std::forward<T>(t));
}