summaryrefslogtreecommitdiff
path: root/include/book_store/person.hh
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-05-31 00:00:12 -0700
committerFuwn <[email protected]>2024-05-31 00:20:41 -0700
commit968e1c4af014b7f40bfaa4f57fcc0f38e5e0d847 (patch)
treedf80525ad0cc9e4b561bfb0772c30ccc5b64b4a2 /include/book_store/person.hh
parentfeat: initial commit (diff)
downloadcst_136_assignment_eight-main.tar.xz
cst_136_assignment_eight-main.zip
feat: final releaseHEADmain
Diffstat (limited to 'include/book_store/person.hh')
-rw-r--r--include/book_store/person.hh14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/book_store/person.hh b/include/book_store/person.hh
index 46b9d59..729001a 100644
--- a/include/book_store/person.hh
+++ b/include/book_store/person.hh
@@ -6,26 +6,26 @@
namespace book_store::consumer {
class person {
private:
- std::string _last_name;
std::string _first_name;
+ std::string _last_name;
std::size_t _id;
public:
- person(std::string last_name, std::string first_name, std::size_t person_id)
- : _last_name(std::move(last_name)), _first_name(std::move(first_name)),
+ person(std::string first_name, std::string last_name, std::size_t person_id)
+ : _first_name(std::move(first_name)), _last_name(std::move(last_name)),
_id(person_id) {}
person() = default;
person(const person &) = default;
person(person &&) = default;
- [[nodiscard]] auto last_name() const noexcept -> std::string_view;
[[nodiscard]] auto first_name() const noexcept -> std::string_view;
- [[nodiscard]] auto full_name(bool last_first = false) const noexcept
- -> std::string;
+ [[nodiscard]] auto last_name() const noexcept -> std::string_view;
+ [[nodiscard]] auto
+ full_name(bool last_first = false) const noexcept -> std::string;
[[nodiscard]] auto id() const noexcept -> std::size_t;
- auto last_name(std::string_view last_name) noexcept -> person &;
auto first_name(std::string_view first_name) noexcept -> person &;
+ auto last_name(std::string_view last_name) noexcept -> person &;
auto id(std::size_t person_id) noexcept -> person &;
auto operator=(const person &) -> person & = default;