From cb376b8b2afd633b47e77ea3c7d6af32437389e9 Mon Sep 17 00:00:00 2001 From: Jeff VanDyke Date: Thu, 12 Sep 2019 11:18:36 -0400 Subject: [PATCH] Strip trailing whitespace --- Jamroot | 2 +- include/mapbox/variant.hpp | 2 +- include/mapbox/variant_visitor.hpp | 4 ++-- test/lambda_overload_test.cpp | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Jamroot b/Jamroot index 4e7a01f..cde9b33 100644 --- a/Jamroot +++ b/Jamroot @@ -59,4 +59,4 @@ install out reference_wrapper_test lambda_overload_test hashable_test - ; + ; diff --git a/include/mapbox/variant.hpp b/include/mapbox/variant.hpp index aa215f8..25cef17 100644 --- a/include/mapbox/variant.hpp +++ b/include/mapbox/variant.hpp @@ -588,7 +588,7 @@ class variant #else data_type data; #endif - + public: VARIANT_INLINE variant() noexcept(std::is_nothrow_default_constructible::value) : type_index(sizeof...(Types)-1) diff --git a/include/mapbox/variant_visitor.hpp b/include/mapbox/variant_visitor.hpp index 54ddba0..baeaf44 100644 --- a/include/mapbox/variant_visitor.hpp +++ b/include/mapbox/variant_visitor.hpp @@ -15,7 +15,7 @@ struct visitor : Fn using Fn::operator(); template - visitor(T&& fn) : Fn(std::forward(fn)) {} + visitor(T&& fn) : Fn(std::forward(fn)) {} }; template @@ -36,7 +36,7 @@ visitor::type...> make_visitor(Fns&&... fns) return visitor::type...> (std::forward(fns)...); } - + } // namespace util } // namespace mapbox diff --git a/test/lambda_overload_test.cpp b/test/lambda_overload_test.cpp index be04a80..b494bdf 100644 --- a/test/lambda_overload_test.cpp +++ b/test/lambda_overload_test.cpp @@ -85,7 +85,7 @@ void test_match_singleton() { variant singleton = 5; singleton.match([](int) {}); - + auto lambda = [](int) {}; singleton.match(lambda); } @@ -118,7 +118,7 @@ void test_match_overloads_capture() struct MovableOnly { MovableOnly() = default; - + MovableOnly(MovableOnly&&) = default; MovableOnly& operator=(MovableOnly&&) = default; }; @@ -126,10 +126,10 @@ struct MovableOnly struct MovableCopyable { MovableCopyable() = default; - + MovableCopyable(MovableCopyable&&) = default; MovableCopyable& operator=(MovableCopyable&&) = default; - + MovableCopyable(const MovableCopyable&) = default; MovableCopyable& operator=(const MovableCopyable&) = default; }; @@ -145,10 +145,10 @@ void test_match_overloads_init_capture() { auto lambda = [p = MovableCopyable{}](auto&&) {}; rv.match(lambda); - + rv.match([p = MovableOnly{}](Response) { std::cout << "Response\n"; }, [p = MovableOnly{}](Error) { std::cout << "Error\n"; }); - } + } { auto lambda = [](Error) { std::cout << "Error\n"; }; rv.match([p = MovableOnly{}](Response) { std::cout << "Response\n"; },