Roll forward to cl/318180324

Signed-off-by: Alexey Polyudov <apolyudov@google.com>
Change-Id: I71bb49fe74104964088d392b12775ec2a253b1c9
This commit is contained in:
Alexey Polyudov
2020-06-24 18:15:07 -07:00
parent 6b27a508ed
commit a4ef9ee564
22 changed files with 576 additions and 109 deletions
+2 -1
View File
@@ -19,7 +19,8 @@ namespace nearby {
template <typename Derived, typename Base>
inline Derived down_cast(Base* value) {
using DerivedType = typename std::remove_pointer<Derived>::type;
static_assert(std::is_base_of<Base, DerivedType>::value);
static_assert(std::is_base_of<Base, DerivedType>::value,
"incompatible casting");
return static_cast<Derived>(value);
}