diff --git a/lang/cpp11/defaulted_and_deleted_functions.md b/lang/cpp11/defaulted_and_deleted_functions.md index 2d2455d3e8..d9777233ed 100644 --- a/lang/cpp11/defaulted_and_deleted_functions.md +++ b/lang/cpp11/defaulted_and_deleted_functions.md @@ -89,7 +89,7 @@ int main() sometype(); // デフォルト動作のコピーコンストラクタを使用する - sometype(const sometype &) = default; + sometype(const sometype&) = default; // デフォルト動作のデストラクタを使用する。 // ただし、このデストラクタは仮想関数とする。 diff --git a/lang/cpp26/allowing_exception_throwing_in_constant-evaluation.md b/lang/cpp26/allowing_exception_throwing_in_constant-evaluation.md index bf8b7f3c7c..d57fc92d18 100644 --- a/lang/cpp26/allowing_exception_throwing_in_constant-evaluation.md +++ b/lang/cpp26/allowing_exception_throwing_in_constant-evaluation.md @@ -28,7 +28,7 @@ const auto b = hello("Hana"); try { const auto c = hello(""); // C++26: 例外を捕捉 -} catch (const validation_error &) { +} catch (const validation_error&) { // everything is fine } diff --git a/lang/cpp26/constexpr_cast_from_voidptr.md b/lang/cpp26/constexpr_cast_from_voidptr.md index 21d55886b9..0b4f7ce91c 100644 --- a/lang/cpp26/constexpr_cast_from_voidptr.md +++ b/lang/cpp26/constexpr_cast_from_voidptr.md @@ -34,7 +34,7 @@ private: std::string_view (*speak_function)(const void*); public: template - constexpr AnimalView(const Animal &a) + constexpr AnimalView(const Animal& a) : animal{&a}, speak_function{[](const void* object) { return static_cast(object)->speak(); }} diff --git a/reference/map/map/at.md b/reference/map/map/at.md index dd0782d6ad..981838d6f1 100644 --- a/reference/map/map/at.md +++ b/reference/map/map/at.md @@ -7,7 +7,7 @@ ```cpp T& at(const key_type& x); // (1) C++11 -const T& at(const key_type & x) const; // (2) C++11 +const T& at(const key_type& x) const; // (2) C++11 template T& at(const K& x); // (3) C++26 diff --git a/reference/set/multiset/extract.md b/reference/set/multiset/extract.md index 9187b14ec1..35a130f573 100644 --- a/reference/set/multiset/extract.md +++ b/reference/set/multiset/extract.md @@ -56,7 +56,7 @@ struct my_struct // ムーブオンリーな型 int num = 0; static inline int count = 0; constexpr my_struct(int i) noexcept : value(i) { num = count++; }; - bool operator < (const my_struct &rhs) const noexcept {return this->value < rhs.value;} + bool operator < (const my_struct& rhs) const noexcept {return this->value < rhs.value;} }; int main() diff --git a/reference/set/set/extract.md b/reference/set/set/extract.md index 3637b42674..c045064d74 100644 --- a/reference/set/set/extract.md +++ b/reference/set/set/extract.md @@ -54,7 +54,7 @@ struct my_struct // ムーブオンリーな型 : private noncopyable { int value; constexpr explicit my_struct(int i) noexcept : value(i) {}; - bool operator < (const my_struct &rhs) const noexcept {return this->value < rhs.value;} + bool operator < (const my_struct& rhs) const noexcept {return this->value < rhs.value;} }; int main() diff --git a/reference/tuple/ignore.md b/reference/tuple/ignore.md index 8d3d8a3bcd..baf5f77dcb 100644 --- a/reference/tuple/ignore.md +++ b/reference/tuple/ignore.md @@ -8,7 +8,7 @@ namespace std { struct ignore-type { // 説明用の定義 (C++26) constexpr const ignore-type& - operator=(const auto &) const noexcept + operator=(const auto&) const noexcept { return *this; } }; diff --git a/reference/unordered_map/unordered_map/at.md b/reference/unordered_map/unordered_map/at.md index aa49034fdb..abe0c2d105 100644 --- a/reference/unordered_map/unordered_map/at.md +++ b/reference/unordered_map/unordered_map/at.md @@ -7,7 +7,7 @@ ```cpp T& at(const key_type& x); // (1) C++11 -const T& at(const key_type & x) const; // (2) C++11 +const T& at(const key_type& x) const; // (2) C++11 template T& at(const K& x); // (3) C++26 diff --git a/reference/unordered_set/unordered_multiset/extract.md b/reference/unordered_set/unordered_multiset/extract.md index 8d97b5ae85..d6de3b38a6 100644 --- a/reference/unordered_set/unordered_multiset/extract.md +++ b/reference/unordered_set/unordered_multiset/extract.md @@ -47,7 +47,7 @@ struct my_struct // ムーブオンリーな型 int num = 0; static inline int count = 0; constexpr my_struct(int i) noexcept : value(i) { num = count++; }; - bool operator == (const my_struct &rhs) const noexcept {return this->value == rhs.value;} + bool operator == (const my_struct& rhs) const noexcept {return this->value == rhs.value;} }; // ハッシュ関数 diff --git a/reference/unordered_set/unordered_set/extract.md b/reference/unordered_set/unordered_set/extract.md index 344fbaee9b..0bb7afefca 100644 --- a/reference/unordered_set/unordered_set/extract.md +++ b/reference/unordered_set/unordered_set/extract.md @@ -47,7 +47,7 @@ struct my_struct // ムーブオンリーな型 int num = 0; static inline int count = 0; constexpr my_struct(int i) noexcept : value(i) { num = count++; }; - bool operator == (const my_struct &rhs) const noexcept {return this->value == rhs.value;} + bool operator == (const my_struct& rhs) const noexcept {return this->value == rhs.value;} }; // ハッシュ関数