<commit_before>#pragma once
#include <type_traits>

namespace augs {
	template <class F>
	class scope_guard {
	public:
		scope_guard(F&& exit_function): exit_function(std::move(exit_function)) {
		}

		scope_guard(scope_guard&& f):
				exit_function(exit_function), 
				execute_on_destruction(execute_on_destruction) {
			f.release();
		}

		~scope_guard() {
			if(execute_on_destruction) {
				exit_function();
			}
		}

		void release() {
			execute_on_destruction = false;
		}

		scope_guard(const scope_guard&) = delete;
		scope_guard& operator =(const scope_guard&) = delete;

	private:
		F exit_function;
		bool execute_on_destruction = true;
	};

	template <class F>
	scope_guard<F> make_scope_guard(F&& exit_function) {
		return scope_guard<F>{std::forward<F>(exit_function)};
	}
}<commit_msg>delete move assignment and formatting fix<commit_after>#pragma once
#include <type_traits>

namespace augs {
	template <class F>
	class scope_guard {
	public:
		scope_guard(F&& exit_function) : 
			exit_function(std::move(exit_function))
		{}

		scope_guard(scope_guard&& f) :
			exit_function(exit_function),
			execute_on_destruction(execute_on_destruction) 
		{
			f.release();
		}

		~scope_guard() {
			if (execute_on_destruction) {
				exit_function();
			}
		}

		void release() {
			execute_on_destruction = false;
		}

		scope_guard(const scope_guard&) = delete;
		scope_guard& operator=(const scope_guard&) = delete;
		scope_guard& operator=(scope_guard&&) = delete;

	private:
		F exit_function;
		bool execute_on_destruction = true;
	};

	template <class F>
	scope_guard<F> make_scope_guard(F&& exit_function) {
		return scope_guard<F>{std::forward<F>(exit_function)};
	}
}
{'fraction_non_alphanumeric': 0.12211025489033787, 'fraction_numerical': 0.0, 'mean_word_length': 4.881533101045296, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '7630706', 'n_tokens_mistral': 672, 'n_tokens_neox': 592, 'n_words': 106}