<commit_before>#pragma once
#include <boost/signals2.hpp>

namespace tracer {

template<typename T>
struct DiscardParams;

typedef boost::signals2::connection Connection;

template<typename... Args> class Signal;

//! չboost.signals2
template <typename R, typename... Args, typename... Other>
class Signal<R(Args...), Other...> : public boost::signals2::signal<R(Args...), Other...> {
public:
	typedef boost::signals2::signal<R(Args...), Other...> signal_t;

	template<typename... Args>
	Signal(Args&&... args) :
		signal_t(std::forward<Args>(args)...)
	{}

	//! һֻᱻһεĲ
	boost::signals2::connection once(const typename signal_t::slot_type& in_slot,
		typename boost::signals2::connect_position at = boost::signals2::at_back)
	{
		return connect_extended([in_solt](const Connection &conn, Args... args) {
			conn.disconnect();
			return in_solt(args...);
		}, at);
	}
	boost::signals2::connection once(const typename signal_t::group_type& group,
		const typename signal_t::slot_type& in_slot,
		typename boost::signals2::connect_position at = boost::signals2::at_back)
	{
		return connect_extended(group, [in_solt](const Connection &conn, Args... args) {
			conn.disconnect();
			return in_solt(args...);
		}, at);
	}

	//! һκβĲ
	Connection connect_without_params(boost::function<void(void)> &&cb) {
		return connect(DiscardParams(std::forward<boost::function<void(void)>>(cb)));
	}

private:
	class DiscardParams {
		boost::function<void(void)> cb_;
	public:
		DiscardParams(const boost::function<void(void)> &cb) :
			cb_(cb)
		{}
		DiscardParams(boost::function<void(void)> &&cb) :
			cb_(std::move(cb))
		{}
		R operator() (Args&&...) {
			cb_();
			return R();
		}
	};
};<commit_msg>Fixed a typo in Signal<commit_after>#pragma once
#include <boost/signals2.hpp>

namespace tracer {

template<typename T>
struct DiscardParams;

typedef boost::signals2::connection Connection;

template<typename... Args> class Signal;

//! չboost.signals2
template <typename R, typename... Args, typename... Other>
class Signal<R(Args...), Other...> : public boost::signals2::signal<R(Args...), Other...> {
public:
	typedef boost::signals2::signal<R(Args...), Other...> signal_t;

	template<typename... Args>
	Signal(Args&&... args) :
		signal_t(std::forward<Args>(args)...)
	{}

	//! һֻᱻһεĲ
	boost::signals2::connection once(const typename signal_t::slot_type& in_slot,
		typename boost::signals2::connect_position at = boost::signals2::at_back)
	{
		return connect_extended([in_slot](const Connection &conn, Args... args) {
			conn.disconnect();
			return in_solt(args...);
		}, at);
	}
	boost::signals2::connection once(const typename signal_t::group_type& group,
		const typename signal_t::slot_type& in_slot,
		typename boost::signals2::connect_position at = boost::signals2::at_back)
	{
		return connect_extended(group, [in_slot](const Connection &conn, Args... args) {
			conn.disconnect();
			return in_solt(args...);
		}, at);
	}

	//! һκβĲ
	Connection connect_without_params(boost::function<void(void)> &&cb) {
		return connect(DiscardParams(std::forward<boost::function<void(void)>>(cb)));
	}

private:
	class DiscardParams {
		boost::function<void(void)> cb_;
	public:
		DiscardParams(const boost::function<void(void)> &cb) :
			cb_(cb)
		{}
		DiscardParams(boost::function<void(void)> &&cb) :
			cb_(std::move(cb))
		{}
		R operator() (Args&&...) {
			cb_();
			return R();
		}
	};
};
{'fraction_non_alphanumeric': 0.18090452261306533, 'fraction_numerical': 0.00650310375406444, 'mean_word_length': 4.947275922671353, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2438499', 'n_tokens_mistral': 1277, 'n_tokens_neox': 1187, 'n_words': 224}