From 7cf2a6ea373cf750d9ab6fd364bb94d9188918bc Mon Sep 17 00:00:00 2001 From: Conrad Jones Date: Sun, 4 Aug 2019 18:16:23 +0100 Subject: [PATCH 1/2] add cmakelists.txt and .gitignore for clion directories --- .gitignore | 2 ++ CMakeLists.txt | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..09f2274 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/* +cmake-build-*/* diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..9f036a4 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.9) +project(NamedType) + +add_executable(named_type main.cpp) \ No newline at end of file From 53066178d7035b19587fcbee2a542f6ba02a5d65 Mon Sep 17 00:00:00 2001 From: Conrad Jones Date: Sun, 4 Aug 2019 18:17:01 +0100 Subject: [PATCH 2/2] remove const qualifier from function parameter which clearly should be there as the function modifies the reference parameter --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 93a2ce3..fc89997 100644 --- a/main.cpp +++ b/main.cpp @@ -46,7 +46,7 @@ TEST_CASE("Basic usage") using NameRef = fluent::NamedType; -void changeValue(const NameRef name) +void changeValue(NameRef name) { name.get() = "value2"; }