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
Rounding float to nearest 1000
Linker error while passing constexpr variable as const &
wasm test for node
Throttle Example using a circular queue (Push all but 2 less than maxSize; then pop all but 2 of current size)
Composite pattern
BucketSort
C++ Standard Template Library
Throttle Example (Send two requests every two seconds)
virtual members
Расстановка восьми ферзей на шахматной доске так, чтобы ни один не угрожал другому - C++