Перейти до основного вмісту

Публікації

D1 Answer: Concepts, Constraint Subsumption, and Overload Resolution.

First of all, code doesn't compile.  error: call of overloaded 'processB(int)' is ambiguous It kind of suggests that the code is ill-formed. Answer to the first question.  Before I jump into further explanations, I would suggest 2 sources to look at:  CppReferences page -  Constraints and Concepts (C++20) CppCon video -  BackToBasics: Concepts Cpp reference article covers lots of ground and goes into great detail about Concepts. However, the language and examples used are sometimes hard to understand. That's where video comes in; Nicolai Josuttis's explanations of Concepts are great.  Going back to the questions in the initial article  D1: Core Language — Concepts, Constraint Subsumption, and Overload Resolution.   Code, as I already mentioned, is ill-formed and doesn't compile. Let's try to understand why.  Logically, we have declared similar concepts. SignedA and SignedB essentially define the same list of requirements for the fun...
Останні дописи

D2: Core Language — if constexpr, std::is_constant_evaluated(), and if consteval

C++17 introduced if constexpr , allowing conditional compilation of branches based on compile-time conditions. C++20 introduced std::is_constant_evaluated() , providing a way to determine whether an expression is being evaluated in a manifestly constant-evaluated context. C++23 added if consteval , offering a more direct mechanism for distinguishing constant-evaluated execution from runtime execution. All three features are part of published C++ standards. Consider the following code, compiled with C++23: #include <type_traits> #include <iostream> constexpr int Calculate(int value) { if constexpr (std::is_constant_evaluated()) { return value * 2; } else { return value * 3; } } int main() { constexpr int compileTime = Calculate(10); int input; std::cin >> input; int runtime = Calculate(input); std::cout << compileTime << '\n'; std::cout << runtime << '\n'; } ...

DeploymentServer tool to automate iOS development

UnrealEngine 4 provides huge amount of tools for game developers which continues to evolve all the time thanks to Epic team and comunity around it. However here is hided one of the problem. Nobody can write documentation or make video tutorials that will cover all aspects of the developement process and highlight possibilities of the engine. That where comunity appears. During development of the game my team faced a lot of challenges and part of them is to configure tools in the most effective way. Here are some of our findings. To work with your device UnrealEngine provide UI tool called iPhonePackager which allows to sign your game package with required provision, install on device or grab local files from device including log files. Underneath of the iPhonePackager works application named DeploymentServer. Actually the same application used to launch game within the UE4 editor on device. But one of the problems iPhonePackager have is UI. Sometimes in order to make the simp...