<commit_before>#include <iostream>

using namespace std;

class Complex {
	double re, im;
public:
	Complex(double r, double i) : re {r}, im {i} {}
	Complex operator+(Complex);
	Complex operator*(Complex);
	friend ostream &operator<<(ostream &os, Complex c);
};

ostream &operator<<(ostream &os, Complex c) {
	os << c.re;
	os << ((c.im >= 0) ? "+" : "-");
	os << c.im << "*i";
	return os;
}

Complex Complex::operator+(Complex c) {
	return Complex{this->re+c.re, this->im+c.im};
}

Complex Complex::operator*(Complex c) {
	double r = this->re*c.re - this->im*c.im;
	double i = this->im*c.re + this->re*c.im;
	// This is OK, probably because this is considered
	// as initializer
	return {r, i};
}

void f() {
	Complex a = Complex{1, 3.1};
	cout << a << endl;
	Complex b {1.2, 2};
	cout << b << endl;
	Complex c {b};
	cout << c << endl;

	cout << b+c << endl;<commit_msg>Change to initilizer list construction<commit_after>#include <iostream>

using namespace std;

class Complex {
	double re, im;
public:
	Complex(double r, double i) : re {r}, im {i} {}
	Complex operator+(Complex);
	Complex operator*(Complex);
	friend ostream &operator<<(ostream &os, Complex c);
};

ostream &operator<<(ostream &os, Complex c) {
	os << c.re;
	os << ((c.im >= 0) ? "+" : "-");
	os << c.im << "*i";
	return os;
}

Complex Complex::operator+(Complex c) {
	return Complex{this->re+c.re, this->im+c.im};
}

Complex Complex::operator*(Complex c) {
	double r = this->re*c.re - this->im*c.im;
	double i = this->im*c.re + this->re*c.im;
	// This is OK, probably because this is considered
	// as initializer
	return {r, i};
}

void f() {
	Complex a = {1, 3.1};
	cout << a << endl;
	Complex b {1.2, 2};
	cout << b << endl;
	Complex c {b};
	cout << c << endl;

	cout << b+c << endl;
{'fraction_non_alphanumeric': 0.20045558086560364, 'fraction_numerical': 0.007972665148063782, 'mean_word_length': 3.6853333333333333, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 19, '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': '2682806', 'n_tokens_mistral': 676, 'n_tokens_neox': 666, 'n_words': 201}