Mass reformat
This commit is contained in:
parent
c55321e6f1
commit
eb41bede5e
7 changed files with 107 additions and 111 deletions
12
junk/1.cc
12
junk/1.cc
|
@ -4,16 +4,16 @@ using std::cout;
|
|||
|
||||
// Rule of three:
|
||||
// If a class requires a user-defined destructor, a user-defined copy
|
||||
// constructor, or a user-defined copy assignment operator, it almost certainly
|
||||
// requires all three.
|
||||
// constructor, or a user-defined copy assignment operator, it almost
|
||||
// certainly requires all three.
|
||||
//
|
||||
|
||||
// Rule of five:
|
||||
// Because the presence of a user-defined (include = default or = delete
|
||||
// declared) destructor, copy-constructor, or copy-assignment operator prevents
|
||||
// implicit definition of the move constructor and the move assignment operator,
|
||||
// any class for which move semantics are desirable, has to declare all five
|
||||
// special member functions:
|
||||
// declared) destructor, copy-constructor, or copy-assignment operator
|
||||
// prevents implicit definition of the move constructor and the move
|
||||
// assignment operator, any class for which move semantics are desirable, has
|
||||
// to declare all five special member functions:
|
||||
|
||||
struct A {
|
||||
A() = default;
|
||||
|
|
|
@ -14,6 +14,4 @@ void use2() {
|
|||
consume_number(&i);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
use2();
|
||||
}
|
||||
int main(int argc, char *argv[]) { use2(); }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <ranges>
|
||||
#include <vector>
|
||||
|
||||
template <typename InputIt, typename OutputIt, typename Pred>
|
||||
std::pair<InputIt, OutputIt> copy_while(InputIt first, InputIt last,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
template <typename T> class User {
|
||||
T id;
|
||||
|
||||
public:
|
||||
public:
|
||||
explicit User(T n) : id(n) {}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
std::cout << "Template" << std::endl;
|
||||
}
|
||||
int main() { std::cout << "Template" << std::endl; }
|
||||
|
|
Loading…
Reference in a new issue