diff --git a/include/boost/core/ref.hpp b/include/boost/core/ref.hpp index 2fd4dc8..8a1acc5 100644 --- a/include/boost/core/ref.hpp +++ b/include/boost/core/ref.hpp @@ -20,6 +20,7 @@ // // Copyright (C) 2014 Glen Joseph Fernandes // glenfe at live dot com +// Copyright (C) 2014 Agustin Berge // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at @@ -112,6 +113,15 @@ template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST ref( T return reference_wrapper(t); } +/** + @return `ref(t.get())` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST ref( reference_wrapper t ) +{ + return reference_wrapper(t.get()); +} + // cref /** @@ -123,6 +133,15 @@ template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST c return reference_wrapper(t); } +/** + @return `cref(t.get())` + @remark Does not throw. +*/ +template BOOST_FORCEINLINE reference_wrapper BOOST_REF_CONST cref( reference_wrapper t ) +{ + return reference_wrapper(t.get()); +} + # undef BOOST_REF_CONST // is_reference_wrapper