From 5956702c32931ae493d1f751be235bc764ee4db7 Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Sun, 25 Nov 2007 18:07:19 +0000 Subject: [PATCH] Full merge from trunk at revision 41356 of entire boost-root tree. [SVN r41369] --- include/boost/none.hpp | 35 ++++++++++------------------------- include/boost/none_t.hpp | 24 ++++++++++++++++++++++++ include/boost/optional.hpp | 2 +- 3 files changed, 35 insertions(+), 26 deletions(-) create mode 100644 include/boost/none_t.hpp diff --git a/include/boost/none.hpp b/include/boost/none.hpp index 6f6f0a6..bd342da 100644 --- a/include/boost/none.hpp +++ b/include/boost/none.hpp @@ -1,43 +1,28 @@ // Copyright (C) 2003, Fernando Luis Cacciola Carballal. -// Copyright (C) 2007, Anthony Williams -// Copyright (C) 2007, Steven Watanabe, Richard Smith // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// See http://www.boost.org/lib/optional/ for documentation. +// See http://www.boost.org/libs/optional for documentation. // // You are welcome to contact the author at: -// fernando.cacciola@gmail.com +// fernando_cacciola@hotmail.com // #ifndef BOOST_NONE_17SEP2003_HPP #define BOOST_NONE_17SEP2003_HPP -namespace boost -{ - namespace detail - { - class none_helper; - } +#include "boost/none_t.hpp" - inline void none(detail::none_helper); +// NOTE: Borland users have to include this header outside any precompiled headers +// (bcc<=5.64 cannot include instance data in a precompiled header) +// -- * To be verified, now that there's no unnamed namespace - namespace detail - { - class none_helper - { - private: - - none_helper( none_helper const& ) {} - - friend void boost::none(none_helper); - }; - } +namespace boost { - typedef void (*none_t)(detail::none_helper); +none_t const none = ((none_t)0) ; - inline void none(detail::none_helper) {} -} +} // namespace boost #endif + diff --git a/include/boost/none_t.hpp b/include/boost/none_t.hpp new file mode 100644 index 0000000..63ad926 --- /dev/null +++ b/include/boost/none_t.hpp @@ -0,0 +1,24 @@ +// Copyright (C) 2003, Fernando Luis Cacciola Carballal. +// +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/optional for documentation. +// +// You are welcome to contact the author at: +// fernando_cacciola@hotmail.com +// +#ifndef BOOST_NONE_T_17SEP2003_HPP +#define BOOST_NONE_T_17SEP2003_HPP + +namespace boost { + +namespace detail { struct none_helper{}; } + +typedef int detail::none_helper::*none_t ; + +} // namespace boost + +#endif + diff --git a/include/boost/optional.hpp b/include/boost/optional.hpp index bc5c5d3..40cf12e 100644 --- a/include/boost/optional.hpp +++ b/include/boost/optional.hpp @@ -4,7 +4,7 @@ // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// See http://www.boost.org/lib/optional for documentation. +// See http://www.boost.org/libs/optional for documentation. // // You are welcome to contact the author at: // fernando_cacciola@hotmail.com