From aa7c021962f529f3ed2f482fd6f02e5497532a8a Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 7 Jun 2023 16:41:32 +0200 Subject: project: begin restructuring --- examples/src/basic_usage.cpp | 39 -------------------------------- examples/src/basic_usage_with_read.cpp | 39 -------------------------------- examples/src/basic_usage_with_show.cpp | 41 ---------------------------------- 3 files changed, 119 deletions(-) delete mode 100644 examples/src/basic_usage.cpp delete mode 100644 examples/src/basic_usage_with_read.cpp delete mode 100644 examples/src/basic_usage_with_show.cpp (limited to 'examples') diff --git a/examples/src/basic_usage.cpp b/examples/src/basic_usage.cpp deleted file mode 100644 index 35d1d2c..0000000 --- a/examples/src/basic_usage.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include - -#include - -using Width = nt::new_type; -using Height = nt::new_type; -using Area = nt::new_type; - -struct Rectangle -{ - constexpr Rectangle(Width w, Height h) - : width{w} - , height{h} - { - } - - auto constexpr area() const noexcept -> Area - { - return {width.decay() * height.decay()}; - } - -private: - Width width; - Height height; -}; - -int main() -{ - auto w{0u}, h{0u}; - - std::cin >> w >> h; - - auto width = Width{w}; - auto height = Height{h}; - - auto rect = Rectangle{width, height}; - - std::cout << rect.area().decay() << '\n'; -} \ No newline at end of file diff --git a/examples/src/basic_usage_with_read.cpp b/examples/src/basic_usage_with_read.cpp deleted file mode 100644 index 2dabe2e..0000000 --- a/examples/src/basic_usage_with_read.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include -#include -#include - -#include - -using Width = nt::new_type; -using Height = nt::new_type; -using Area = nt::new_type; - -struct Rectangle -{ - constexpr Rectangle(Width w, Height h) - : width{w} - , height{h} - { - } - - auto constexpr area() const noexcept -> Area - { - return {width.decay() * height.decay()}; - } - -private: - Width width; - Height height; -}; - -int main() -{ - auto width = Width{}; - auto height = Height{}; - - std::cin >> width >> height; - - auto rect = Rectangle{width, height}; - - std::cout << rect.area() << '\n'; -} \ No newline at end of file diff --git a/examples/src/basic_usage_with_show.cpp b/examples/src/basic_usage_with_show.cpp deleted file mode 100644 index 4bb68f6..0000000 --- a/examples/src/basic_usage_with_show.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include -#include - -#include - -using Width = nt::new_type; -using Height = nt::new_type; -using Area = nt::new_type; - -struct Rectangle -{ - constexpr Rectangle(Width w, Height h) - : width{w} - , height{h} - { - } - - auto constexpr area() const noexcept -> Area - { - return {width.decay() * height.decay()}; - } - -private: - Width width; - Height height; -}; - -int main() -{ - auto w{0u}, h{0u}; - - std::cin >> w >> h; - - auto width = Width{w}; - auto height = Height{h}; - - auto rect = Rectangle{width, height}; - - std::cout << rect.area() << '\n'; -} \ No newline at end of file -- cgit v1.2.3