Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
MSVC-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)); }; constexpr bool IsBaseOf<A, B>::value; // necessary definition in c++14 while redundant declaration since 1z int main() { static_assert(IsBaseOf<A, B>::value, "Pass"); }
run
|
edit
|
history
|
help
0
accessibility on in-class typedefs
복소수 클래스 생성하기
Printf %px test
#31
DCapSurfaceDesc
inherited
What is the fastest/most efficient way to find the highest set bit (msb) in an integer in C?
32
map_file_mangling
move swap