@KarelGardas I was wrong, 'if constexpr' works in same cases
template<typename T>
void test(T& shape) {
if constexpr (Shape::implements<T>) {
test_impl(shape);
test_dyn(&shape);
}
}
@KarelGardas If I understand correctly, you mean check if trait is implemented on class/struct when declaring Circle/Square instead of Circle/Square instance? You can use Shape::implements or stl::impl in static_assert, 'if constexpr' unfortunately not working, I don't know why
Rust-like traits implementation in C++ without macros using p1240r1 (Scalable Reflection in C++)
https://t.co/IIF7OBHnCh
https://t.co/T176ZERlQP
#CPP#programming
@samuelpoisonx @zhuowei You need create custom launcher or patch com.mojang.minecraftpe.MainActivity to preload library with my code and call nativeInitHooks in onCreate. Then add custom_title.png (see full path in loadImageFromMemory implementation) and build apk
the russians have hidden the torture of prisoners of war by killing them.
Those terrorists can not be part of a mentally healthy society. They must be imprisoned in the deepest corner of the Earth.
#Olenivka#ArmUkraineNow#RussiaIsATerroristState