MCPcopy Create free account
hub / github.com/davisking/dlib / is_same_object

Function is_same_object

dlib/algs.h:401–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399 // handle the case where T and U are unrelated types.
400 template < typename T, typename U >
401 std::enable_if_t<!std::is_convertible<T*, U*>::value && !std::is_convertible<U*,T*>::value, bool>
402 is_same_object (
403 const T& a,
404 const U& b
405 )
406 {
407 return ((void*)&a == (void*)&b);
408 }
409
410 // handle the case where T and U are related types because their pointers can be
411 // implicitly converted into one or the other. E.g. a derived class and its base class.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected