CPPSOBES Telegram 63
🔍 Что выведет этот код C++23?


constexpr auto make_checker() {
return [](int x) consteval {
return x % 3 == 0 || x % 5 == 0;
};
}

int main() {
auto checker = make_checker();
std::vector<int> numbers{1, 3, 5, 9, 10, 14, 15};
auto filtered = numbers | std::views::filter([&](int x) {
return checker(x);
});
for (int x : filtered)
std::print("{} ", x);
}


🧠 Попробуй угадать результат — он может удивить!

@cppsobes



tgoop.com/cppsobes/63
Create:
Last Update:

🔍 Что выведет этот код C++23?


constexpr auto make_checker() {
return [](int x) consteval {
return x % 3 == 0 || x % 5 == 0;
};
}

int main() {
auto checker = make_checker();
std::vector<int> numbers{1, 3, 5, 9, 10, 14, 15};
auto filtered = numbers | std::views::filter([&](int x) {
return checker(x);
});
for (int x : filtered)
std::print("{} ", x);
}


🧠 Попробуй угадать результат — он может удивить!

@cppsobes

BY С++ Собеседования


Share with your friend now:
tgoop.com/cppsobes/63

View MORE
Open in Telegram


Telegram News

Date: |

Developing social channels based on exchanging a single message isn’t exactly new, of course. Back in 2014, the “Yo” app was launched with the sole purpose of enabling users to send each other the greeting “Yo.” How to create a business channel on Telegram? (Tutorial) Click “Save” ; The group also hosted discussions on committing arson, Judge Hui said, including setting roadblocks on fire, hurling petrol bombs at police stations and teaching people to make such weapons. The conversation linked to arson went on for two to three months, Hui said. More>>
from us


Telegram С++ Собеседования
FROM American