From a6d8c4f20c7a954e0c2e2fc69af410045c963b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20J=C3=A4rvi?= Date: Wed, 26 Sep 2001 13:23:31 +0000 Subject: [PATCH] superseded by boost/ref.hpp [SVN r11275] --- include/boost/tuple/reference_wrappers.hpp | 57 ---------------------- 1 file changed, 57 deletions(-) delete mode 100644 include/boost/tuple/reference_wrappers.hpp diff --git a/include/boost/tuple/reference_wrappers.hpp b/include/boost/tuple/reference_wrappers.hpp deleted file mode 100644 index 52df59f..0000000 --- a/include/boost/tuple/reference_wrappers.hpp +++ /dev/null @@ -1,57 +0,0 @@ -// -- reference_wrappers - Boost Tuple Library ----------------------------- - -// Copyright (C) 1999, 2000 Jaakko Järvi (jaakko.jarvi@cs.utu.fi) -// -// Permission to copy, use, sell and distribute this software is granted -// provided this copyright notice appears in all copies. -// Permission to modify the code and to distribute modified code is granted -// provided this copyright notice appears in all copies, and a notice -// that the code was modified is included with the copyright notice. -// -// This software is provided "as is" without express or implied warranty, -// and with no claim as to its suitability for any purpose. -// -// For more information, see http://www.boost.org - -// ----------------------------------------------------------------- - -#ifndef BOOST_TUPLE_REFERENCE_WRAPPERS_HPP -#define BOOST_TUPLE_REFERENCE_WRAPPERS_HPP - -namespace boost { - - -// reference wrappers ------------------------------------------------------- - -// These wrappers are handle classes that hold references to objects. - -// reference_wrapper is used to specify that a tuple element should be -// a reference to the wrapped object - rather than a copy of it. -// The wrapper acts as a disguise for passing non-const reference -// parameters via a reference to const parameter. - -template -class reference_wrapper { - T& x; -public: - explicit - reference_wrapper(T& t) : x(t) {} - operator T&() const { return x; } -}; - -// store as a reference to T -template -inline const reference_wrapper ref(T& t) { - return reference_wrapper(t); -} - -// store as a reference to const T -template -inline const reference_wrapper cref(const T& t) { - return reference_wrapper(t); -} - -} // end of namespace boost - - -#endif // BOOST_TUPLE_REFERENCE_WRAPPERS_HPP