File tree Expand file tree Collapse file tree 10 files changed +10
-10
lines changed
unordered_map/unordered_map Expand file tree Collapse file tree 10 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ int main()
8989 sometype();
9090
9191 // デフォルト動作のコピーコンストラクタを使用する
92- sometype(const sometype &) = default;
92+ sometype(const sometype&) = default;
9393
9494 // デフォルト動作のデストラクタを使用する。
9595 // ただし、このデストラクタは仮想関数とする。
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ const auto b = hello("Hana");
2828
2929try {
3030 const auto c = hello(""); // C++26: 例外を捕捉
31- } catch (const validation_error &) {
31+ } catch (const validation_error&) {
3232 // everything is fine
3333}
3434
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ private:
3434 std::string_view (* speak_function)(const void* );
3535public:
3636 template <typename Animal >
37- constexpr AnimalView(const Animal & a)
37+ constexpr AnimalView(const Animal& a)
3838 : animal{&a}, speak_function{[ ] (const void* object) {
3939 return static_cast<const Animal* >(object)->speak();
4040 }}
Original file line number Diff line number Diff line change 77
88``` cpp
99T& at (const key_type& x); // (1) C++11
10- const T& at(const key_type & x) const; // (2) C++11
10+ const T& at(const key_type& x) const; // (2) C++11
1111
1212template<class K >
1313T& at(const K& x); // (3) C++26
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ struct my_struct // ムーブオンリーな型
5656 int num = 0;
5757 static inline int count = 0;
5858 constexpr my_struct(int i) noexcept : value(i) { num = count++; };
59- bool operator < (const my_struct & rhs) const noexcept {return this->value < rhs.value;}
59+ bool operator < (const my_struct& rhs) const noexcept {return this->value < rhs.value;}
6060};
6161
6262int main()
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ struct my_struct // ムーブオンリーな型
5454 : private noncopyable {
5555 int value;
5656 constexpr explicit my_struct(int i) noexcept : value(i) {};
57- bool operator < (const my_struct & rhs) const noexcept {return this->value < rhs.value;}
57+ bool operator < (const my_struct& rhs) const noexcept {return this->value < rhs.value;}
5858};
5959
6060int main()
Original file line number Diff line number Diff line change 88namespace std {
99 struct ignore-type { // 説明用の定義 (C++26)
1010 constexpr const ignore-type&
11- operator=(const auto &) const noexcept
11+ operator=(const auto&) const noexcept
1212 { return * this; }
1313 };
1414
Original file line number Diff line number Diff line change 77
88``` cpp
99T& at (const key_type& x); // (1) C++11
10- const T& at(const key_type & x) const; // (2) C++11
10+ const T& at(const key_type& x) const; // (2) C++11
1111
1212template<class K >
1313T& at(const K& x); // (3) C++26
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ struct my_struct // ムーブオンリーな型
4747 int num = 0;
4848 static inline int count = 0;
4949 constexpr my_struct(int i) noexcept : value(i) { num = count++; };
50- bool operator == (const my_struct & rhs) const noexcept {return this->value == rhs.value;}
50+ bool operator == (const my_struct& rhs) const noexcept {return this->value == rhs.value;}
5151};
5252
5353// ハッシュ関数
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ struct my_struct // ムーブオンリーな型
4747 int num = 0;
4848 static inline int count = 0;
4949 constexpr my_struct(int i) noexcept : value(i) { num = count++; };
50- bool operator == (const my_struct & rhs) const noexcept {return this->value == rhs.value;}
50+ bool operator == (const my_struct& rhs) const noexcept {return this->value == rhs.value;}
5151};
5252
5353// ハッシュ関数
You can’t perform that action at this time.
0 commit comments