Warning: preg_grep(): Compilation failed: quantifier does not follow a repeatable item at offset 157 in /var/www/tg-me/post.php on line 75
Библиотека C/C++ разработчика | cpp, boost, qt | Telegram Webview: cppproglib/5782 -
Telegram Group & Telegram Channel
⚡️ Фича дня: if consteval в C++23

Хотите разный код для compile-time и runtime? C++23 добавляет if consteval для условной компиляции!


🔴 До: Сложные трюки

template<typename T>
constexpr T compute() {
if (std::is_constant_evaluated()) {
return compile_time_version<T>();
}
return runtime_version<T>();
}



🟢 После: Читаемый consteval

template<typename T>
constexpr T compute() {
if consteval {
return compile_time_version<T>();
} else {
return runtime_version<T>();
}
}



❗️Практические применения:

• Оптимизированные математические библиотеки
• Compile-time криптография
• Генерация lookup-таблиц


💡Используете метапрограммирование в ваших проектах?

Библиотека C/C++ разработчика #буст
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/cppproglib/5782
Create:
Last Update:

⚡️ Фича дня: if consteval в C++23

Хотите разный код для compile-time и runtime? C++23 добавляет if consteval для условной компиляции!


🔴 До: Сложные трюки

template<typename T>
constexpr T compute() {
if (std::is_constant_evaluated()) {
return compile_time_version<T>();
}
return runtime_version<T>();
}



🟢 После: Читаемый consteval

template<typename T>
constexpr T compute() {
if consteval {
return compile_time_version<T>();
} else {
return runtime_version<T>();
}
}



❗️Практические применения:

• Оптимизированные математические библиотеки
• Compile-time криптография
• Генерация lookup-таблиц


💡Используете метапрограммирование в ваших проектах?

Библиотека C/C++ разработчика #буст

BY Библиотека C/C++ разработчика | cpp, boost, qt




Share with your friend now:
tg-me.com/cppproglib/5782

View MORE
Open in Telegram


Библиотека C C разработчика | cpp boost qt Telegram | DID YOU KNOW?

Date: |

Telegram is riding high, adding tens of million of users this year. Now the bill is coming due.Telegram is one of the few significant social-media challengers to Facebook Inc., FB -1.90% on a trajectory toward one billion users active each month by the end of 2022, up from roughly 550 million today.

Tata Power whose core business is to generate, transmit and distribute electricity has made no money to investors in the last one decade. That is a big blunder considering it is one of the largest power generation companies in the country. One of the reasons is the company's huge debt levels which stood at ₹43,559 crore at the end of March 2021 compared to the company’s market capitalisation of ₹44,447 crore.

Библиотека C C разработчика | cpp boost qt from us


Telegram Библиотека C/C++ разработчика | cpp, boost, qt
FROM USA