From 3fec6509e348d576f5cd58f4fa3ddac0c46dce0f Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 22 May 2015 17:23:30 -0500 Subject: [PATCH] Start update for the rest of the function object to be unique references --- fit/always.h | 5 +++-- fit/apply.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fit/always.h b/fit/always.h index 3996a3d..7f0af8d 100644 --- a/fit/always.h +++ b/fit/always.h @@ -10,6 +10,7 @@ #include #include +#include /// always /// ====== @@ -86,8 +87,8 @@ struct always_ref_f } -FIT_STATIC_CONSTEXPR detail::always_f always = {}; -FIT_STATIC_CONSTEXPR detail::always_ref_f always_ref = {}; +static constexpr auto& always = static_const(); +static constexpr auto& always_ref = static_const(); } diff --git a/fit/apply.h b/fit/apply.h index fbce56b..c55dcf2 100644 --- a/fit/apply.h +++ b/fit/apply.h @@ -45,7 +45,7 @@ #include #include -#include +#include namespace fit { @@ -62,7 +62,7 @@ struct apply_f } -FIT_STATIC_CONSTEXPR detail::apply_f apply = {}; +static constexpr auto& apply = static_const(); }