tdesktop/Telegram/SourceFiles/rpl/never.h

22 lines
498 B
C++

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include <rpl/producer.h>
namespace rpl {
template <typename Value = empty_value, typename Error = no_error>
inline auto never() {
return make_producer<Value, Error>([](const auto &consumer) {
return lifetime();
});
}
} // namespace rpl