Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Clang-IsBaseOf
#include <type_traits> #include <cstdint> struct A { }; struct B : A { }; template <typename T, typename U> struct IsBaseOf { constexpr static bool Testment(T* t) { return true; } constexpr static bool Testment(...) { return false; } constexpr static bool value = IsBaseOf<T,U>::Testment(static_cast<U*>(nullptr)); }; int main() { static_assert(IsBaseOf<A, B>::value, "Pass"); }
run
|
edit
|
history
|
help
0
ArrayList Example Starter Code 2
mine
Uno v2
regex
ECE2574_Function_Calling_Example
problem_name_2
<string> No indirect include of <errno.h>
11/18
C++ Template
return reference (clang)