Evgenii Legotckoi
Aug. 22, 2019, 1:42 p.m.

C++C ++ 17 - Lazy template functor with caching heavy function computation result

lambda, functor, C++17, auto

Developing the idea of caching the result of calculations of heavy functions , I propose to write a small template class, which will take the function as an argument, namely the lambda function, as the most universal an instrument within …

Read
Evgenii Legotckoi
Aug. 21, 2019, 3:45 p.m.

C++C++14 - lambda function with cached return value

C++14, lambda, auto, cache, C++

Suppose we wrote a function that calculates some value or uses a function to calculate this value, while the function_ which calculates the value is quite expensive to calculate and works for a long time. In this case, we call …

Read
Evgenii Legotckoi
Aug. 21, 2019, 1:56 p.m.

C++C++14 - unnamed structure as auto value returned by function

lambda, C++, C++14, auto

Let's look at an interesting construction from the C++14 standard, which allows you to return the structure used in one place of the code, but you need to return an object with named fields.

Such a construction can serve as …

Read
Evgenii Legotckoi
Aug. 6, 2018, 12:52 p.m.

C++The idiom RAII and the principle of structured programming that a function must have one entry point and one exit point

template, lambda, C++11

The world of programming in C ++ in the new standards allows us to get up a variety of things, thanks to which we can safely abandon some old statements or principles, or simply flexibly approach these principles.

I would …

Read
Evgenii Legotckoi
July 6, 2018, 2:26 p.m.

C++Cooking lambda functions in C ++ - Part 2 - Recursive lambda functions using the example of factorial calculation

factorial, lambda, C++, лямбда функция, факториал

In the previous article , we got acquainted with the structure of lambda functions, and now we'll play with lambdas, calculate the factorial, and consider how the lambda function can be applied for this.

Let's consider for the beginning the …

Read
Evgenii Legotckoi
Aug. 28, 2016, 9:17 p.m.

QtQt/C++ - Lesson 055. QSignalMapper VS lambda functions

лямбда функция, Qt, C++, lambda, QSignalMapper

QSignalMapper is a wonderful class to organize the work of the signals and slots dynamically created objects. For example, the dynamically created buttons or objects in QStackedWidget. This was particularly true in older versions of the software, that is, and …

Read
  • Last comments
  • IscanderChe
    April 12, 2025, 5:12 p.m.
    Добрый день. Спасибо Вам за этот проект и отдельно за ответы на форуме, которые мне очень помогли в некоммерческих пет-проектах. Профессиональным программистом я так и не стал, но узнал мно…
  • AK
    April 1, 2025, 11:41 a.m.
    Добрый день. В данный момент работаю над проектом, где необходимо выводить звук из программы в определенное аудиоустройство (колонки, наушники, виртуальный кабель и т.д). Пишу на Qt5.12.12 поско…
  • Evgenii Legotckoi
    March 9, 2025, 9:02 p.m.
    К сожалению, я этого подсказать не могу, поскольку у меня нет необходимости в обходе блокировок и т.д. Поэтому я и не задавался решением этой проблемы. Ну выглядит так, что вам действитель…
  • VP
    March 9, 2025, 4:14 p.m.
    Здравствуйте! Я устанавливал Qt6 из исходников а также Qt Creator по отдельности. Все компоненты, связанные с разработкой для Android, установлены. Кроме одного... Когда пытаюсь скомпилиров…
  • ИМ
    Nov. 22, 2024, 9:51 p.m.
    Добрый вечер Евгений! Я сделал себе авторизацию аналогичную вашей, все работает, кроме возврата к предидущей странице. Редеректит всегда на главную, хотя в логах сервера вижу запросы на правильн…