diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2022-08-30 14:40:56 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2022-08-30 14:40:56 +0300 |
commit | 80a7a34cae24c373311a62eee4324519719a0587 (patch) | |
tree | 87be0a22665d760c00c4597b3c141db091f63e0a /contrib/restricted/boost | |
parent | 810fc0836b07bb8591a0e8a693e600eab2795a8b (diff) | |
download | ydb-80a7a34cae24c373311a62eee4324519719a0587.tar.gz |
Update contrib/restricted/boost/spirit to 1.80.0
Diffstat (limited to 'contrib/restricted/boost')
198 files changed, 1095 insertions, 6671 deletions
diff --git a/contrib/restricted/boost/core/include/boost/detail/sp_typeinfo.hpp b/contrib/restricted/boost/core/include/boost/detail/sp_typeinfo.hpp deleted file mode 100644 index bec228f57d..0000000000 --- a/contrib/restricted/boost/core/include/boost/detail/sp_typeinfo.hpp +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED -#define BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// detail/sp_typeinfo.hpp -// -// Deprecated, please use boost/core/typeinfo.hpp -// -// Copyright 2007 Peter Dimov -// -// 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) - -#include <boost/core/typeinfo.hpp> -#include <boost/config/header_deprecated.hpp> - -BOOST_HEADER_DEPRECATED( "<boost/core/typeinfo.hpp>" ) - -namespace boost -{ - -namespace detail -{ - -typedef boost::core::typeinfo sp_typeinfo; - -} // namespace detail - -} // namespace boost - -#define BOOST_SP_TYPEID(T) BOOST_CORE_TYPEID(T) - -#endif // #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/algorithm/transformation/reverse.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/algorithm/transformation/reverse.hpp deleted file mode 100644 index 53de417a13..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/algorithm/transformation/reverse.hpp +++ /dev/null @@ -1,40 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(FUSION_REVERSE_07212005_1230) -#define FUSION_REVERSE_07212005_1230 - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/view/reverse_view/reverse_view.hpp> -#include <boost/fusion/support/is_sequence.hpp> -#include <boost/utility/enable_if.hpp> - -namespace boost { namespace fusion -{ - namespace result_of - { - template <typename Sequence> - struct reverse - { - typedef reverse_view<Sequence> type; - }; - } - - template <typename Sequence> - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline typename - enable_if< - traits::is_sequence<Sequence> - , reverse_view<Sequence const> - >::type - reverse(Sequence const& view) - { - return reverse_view<Sequence const>(view); - } -}} - -#endif - diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/include/pop_back.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/include/pop_back.hpp deleted file mode 100644 index 213fb3b271..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/include/pop_back.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(FUSION_INCLUDE_POP_BACK) -#define FUSION_INCLUDE_POP_BACK - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/algorithm/transformation/pop_back.hpp> - -#endif diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/include/prior.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/include/prior.hpp deleted file mode 100644 index 605b3b398a..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/include/prior.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(FUSION_INCLUDE_PRIOR) -#define FUSION_INCLUDE_PRIOR - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/iterator/prior.hpp> - -#endif diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/include/push_back.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/include/push_back.hpp deleted file mode 100644 index 6e74b3fa8a..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/include/push_back.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(FUSION_INCLUDE_PUSH_BACK) -#define FUSION_INCLUDE_PUSH_BACK - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/algorithm/transformation/push_back.hpp> - -#endif diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/include/reverse.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/include/reverse.hpp deleted file mode 100644 index 4f147b9882..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/include/reverse.hpp +++ /dev/null @@ -1,13 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2007 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(FUSION_INCLUDE_REVERSE) -#define FUSION_INCLUDE_REVERSE - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/algorithm/transformation/reverse.hpp> - -#endif diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/advance_impl.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/advance_impl.hpp deleted file mode 100644 index 42b3bd1908..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/advance_impl.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2005-2006 Dan Marsden - - 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) -==============================================================================*/ -#if !defined(FUSION_ADVANCE_IMPL_14122005_2015) -#define FUSION_ADVANCE_IMPL_14122005_2015 - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/iterator/advance.hpp> -#include <boost/mpl/negate.hpp> - -namespace boost { namespace fusion { - - struct reverse_view_iterator_tag; - - template <typename Iterator> - struct reverse_view_iterator; - - namespace extension - { - template<typename Tag> - struct advance_impl; - - template<> - struct advance_impl<reverse_view_iterator_tag> - { - template<typename Iterator, typename Dist> - struct apply - { - typedef typename Iterator::first_type first_type; - typedef typename mpl::negate<Dist>::type negative_dist; - typedef typename result_of::advance<first_type, negative_dist>::type advanced_type; - typedef reverse_view_iterator<advanced_type> type; - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static type - call(Iterator const& i) - { - return type(boost::fusion::advance<negative_dist>(i.first)); - } - }; - }; - } -}} - -#endif diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/at_impl.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/at_impl.hpp deleted file mode 100644 index d1fc7715e8..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/at_impl.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2009 Christopher Schmidt - - 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) -==============================================================================*/ - -#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP -#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/sequence/intrinsic/at.hpp> -#include <boost/mpl/minus.hpp> -#include <boost/mpl/int.hpp> - -namespace boost { namespace fusion { namespace extension -{ - template <typename> - struct at_impl; - - template <> - struct at_impl<reverse_view_tag> - { - template <typename Seq, typename N> - struct apply - { - typedef mpl::minus<typename Seq::size, mpl::int_<1>, N> real_n; - - typedef typename - result_of::at<typename Seq::seq_type, real_n>::type - type; - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static type - call(Seq& seq) - { - return fusion::at<real_n>(seq.seq); - } - }; - }; -}}} - -#endif diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/begin_impl.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/begin_impl.hpp deleted file mode 100644 index 913725ede4..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/begin_impl.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(FUSION_BEGIN_IMPL_07202005_0849) -#define FUSION_BEGIN_IMPL_07202005_0849 - -namespace boost { namespace fusion -{ - struct reverse_view_tag; - - template <typename Iterator> - struct reverse_view_iterator; - - namespace extension - { - template <typename Tag> - struct begin_impl; - - template <> - struct begin_impl<reverse_view_tag> - { - template <typename Sequence> - struct apply - { - typedef reverse_view_iterator<typename Sequence::last_type> type; - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static type - call(Sequence const& s) - { - return type(s.last()); - } - }; - }; - } -}} - -#endif - - diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp deleted file mode 100644 index e93b8fba9c..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/*============================================================================= - Copyright (c) 2009 Christopher Schmidt - - 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) -==============================================================================*/ - -#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_DATA_IMPL_HPP -#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_DATA_IMPL_HPP - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/iterator/deref_data.hpp> - -namespace boost { namespace fusion { namespace extension -{ - template <typename> - struct deref_data_impl; - - template <> - struct deref_data_impl<reverse_view_iterator_tag> - { - template <typename It> - struct apply - { - typedef typename - result_of::deref_data<typename It::first_type>::type - type; - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static type - call(It const& it) - { - return fusion::deref_data(it.first); - } - }; - }; -}}} - -#endif diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/deref_impl.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/deref_impl.hpp deleted file mode 100644 index 9ea60d812d..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/deref_impl.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(FUSION_DEREF_IMPL_07202005_0851) -#define FUSION_DEREF_IMPL_07202005_0851 - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/iterator/deref.hpp> -#include <boost/fusion/iterator/prior.hpp> - -namespace boost { namespace fusion -{ - struct reverse_view_iterator_tag; - - namespace extension - { - template <typename Tag> - struct deref_impl; - - template <> - struct deref_impl<reverse_view_iterator_tag> - { - template <typename Iterator> - struct apply - { - typedef typename - result_of::deref< - typename result_of::prior< - typename Iterator::first_type - >::type - >::type - type; - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static type - call(Iterator const& i) - { - return *fusion::prior(i.first); - } - }; - }; - } -}} - -#endif - - diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/distance_impl.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/distance_impl.hpp deleted file mode 100644 index 49436c26b6..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/distance_impl.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2005-2006 Dan Marsden - - 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) -==============================================================================*/ -#if !defined(FUSION_DISTANCE_IMPL_14122005_2104) -#define FUSION_DISTANCE_IMPL_14122005_2104 - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/iterator/distance.hpp> - -namespace boost { namespace fusion { - - struct reverse_view_iterator_tag; - - template <typename Iterator> - struct reverse_view_iterator; - - namespace extension - { - template<typename Tag> - struct distance_impl; - - template<> - struct distance_impl<reverse_view_iterator_tag> - { - template<typename First, typename Last> - struct apply - { - typedef typename First::first_type first_type; - typedef typename Last::first_type last_type; - typedef typename result_of::distance<last_type, first_type>::type type; - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static type - call(First const& first, Last const& last) - { - return boost::fusion::distance(last.first, first.first); - } - }; - }; - } -}} - -#endif diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/end_impl.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/end_impl.hpp deleted file mode 100644 index 06602c0eda..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/end_impl.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(FUSION_END_IMPL_07202005_0851) -#define FUSION_END_IMPL_07202005_0851 - -namespace boost { namespace fusion -{ - struct reverse_view_tag; - - template <typename Iterator> - struct reverse_view_iterator; - - namespace extension - { - template <typename Tag> - struct end_impl; - - template <> - struct end_impl<reverse_view_tag> - { - template <typename Sequence> - struct apply - { - typedef reverse_view_iterator<typename Sequence::first_type> type; - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static type - call(Sequence const& s) - { - return type(s.first()); - } - }; - }; - } -}} - -#endif - - diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/key_of_impl.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/key_of_impl.hpp deleted file mode 100644 index 985e5fa9cd..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/key_of_impl.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2009 Christopher Schmidt - - 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) -==============================================================================*/ - -#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_KEY_OF_IMPL_HPP -#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_KEY_OF_IMPL_HPP - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/iterator/key_of.hpp> - -namespace boost { namespace fusion { namespace extension -{ - template <typename> - struct key_of_impl; - - template <> - struct key_of_impl<reverse_view_iterator_tag> - { - template <typename It> - struct apply - : result_of::key_of<typename It::it_type> - {}; - }; -}}} - -#endif diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/next_impl.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/next_impl.hpp deleted file mode 100644 index 58c1f5f71a..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/next_impl.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(FUSION_NEXT_IMPL_07202005_0856) -#define FUSION_NEXT_IMPL_07202005_0856 - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/iterator/next.hpp> -#include <boost/fusion/iterator/prior.hpp> - -namespace boost { namespace fusion -{ - struct reverse_view_iterator_tag; - - template <typename Iterator> - struct reverse_view_iterator; - - namespace extension - { - template <> - struct next_impl<reverse_view_iterator_tag> - { - template <typename Iterator> - struct apply - { - typedef typename Iterator::first_type first_type; - typedef typename prior_impl<typename first_type::fusion_tag>:: - template apply<first_type> - wrapped; - - typedef reverse_view_iterator<typename wrapped::type> type; - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static type - call(Iterator const& i) - { - return type(wrapped::call(i.first)); - } - }; - }; - } -}} - -#endif - - diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/prior_impl.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/prior_impl.hpp deleted file mode 100644 index 69d18501cd..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/prior_impl.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(FUSION_PRIOR_IMPL_07202005_0857) -#define FUSION_PRIOR_IMPL_07202005_0857 - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/iterator/next.hpp> -#include <boost/fusion/iterator/prior.hpp> - -namespace boost { namespace fusion -{ - struct reverse_view_iterator_tag; - - template <typename Iterator> - struct reverse_view_iterator; - - namespace extension - { - template <> - struct prior_impl<reverse_view_iterator_tag> - { - template <typename Iterator> - struct apply - { - typedef typename Iterator::first_type first_type; - typedef typename next_impl<typename first_type::fusion_tag>:: - template apply<first_type> - wrapped; - - typedef reverse_view_iterator<typename wrapped::type> type; - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - static type - call(Iterator const& i) - { - return type(wrapped::call(i.first)); - } - }; - }; - } -}} - -#endif - - diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/value_at_impl.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/value_at_impl.hpp deleted file mode 100644 index 76465fd74a..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/value_at_impl.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/*============================================================================= - Copyright (c) 2009 Christopher Schmidt - - 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) -==============================================================================*/ - -#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_AT_IMPL_HPP -#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_AT_IMPL_HPP - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/sequence/intrinsic/value_at.hpp> -#include <boost/mpl/minus.hpp> -#include <boost/mpl/int.hpp> - -namespace boost { namespace fusion { namespace extension -{ - template <typename> - struct value_at_impl; - - template <> - struct value_at_impl<reverse_view_tag> - { - template <typename Seq, typename N> - struct apply - : result_of::value_at< - typename Seq::seq_type - , mpl::minus<typename Seq::size, mpl::int_<1>, N> - > - {}; - }; -}}} - -#endif diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp deleted file mode 100644 index a96d1ce362..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*============================================================================= - Copyright (c) 2009 Christopher Schmidt - - 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) -==============================================================================*/ - -#ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP -#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/iterator/value_of_data.hpp> - -namespace boost { namespace fusion { namespace extension -{ - template <typename> - struct value_of_data_impl; - - template <> - struct value_of_data_impl<reverse_view_iterator_tag> - { - template <typename It> - struct apply - : result_of::value_of_data<typename It::first_type> - {}; - }; -}}} - -#endif diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/value_of_impl.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/value_of_impl.hpp deleted file mode 100644 index ea171ba950..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/detail/value_of_impl.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(FUSION_VALUE_OF_IMPL_07202005_0900) -#define FUSION_VALUE_OF_IMPL_07202005_0900 - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/iterator/value_of.hpp> -#include <boost/fusion/iterator/prior.hpp> - -namespace boost { namespace fusion -{ - struct reverse_view_iterator_tag; - - namespace extension - { - template <typename Tag> - struct value_of_impl; - - template <> - struct value_of_impl<reverse_view_iterator_tag> - { - template <typename Iterator> - struct apply - { - typedef typename - result_of::value_of< - typename result_of::prior< - typename Iterator::first_type - >::type - >::type - type; - }; - }; - } -}} - -#endif - - diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/reverse_view.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/reverse_view.hpp deleted file mode 100644 index 0aa3d10664..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/reverse_view.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(FUSION_REVERSE_VIEW_07202005_0836) -#define FUSION_REVERSE_VIEW_07202005_0836 - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/support/detail/access.hpp> -#include <boost/fusion/support/is_view.hpp> -#include <boost/fusion/support/category_of.hpp> -#include <boost/fusion/view/reverse_view/reverse_view_iterator.hpp> -#include <boost/fusion/view/reverse_view/detail/begin_impl.hpp> -#include <boost/fusion/view/reverse_view/detail/end_impl.hpp> -#include <boost/fusion/view/reverse_view/detail/at_impl.hpp> -#include <boost/fusion/view/reverse_view/detail/value_at_impl.hpp> -#include <boost/fusion/support/sequence_base.hpp> -#include <boost/fusion/sequence/intrinsic/begin.hpp> -#include <boost/fusion/sequence/intrinsic/end.hpp> -#include <boost/fusion/sequence/intrinsic/size.hpp> -#include <boost/type_traits/is_base_of.hpp> -#include <boost/static_assert.hpp> -#include <boost/mpl/bool.hpp> -#include <boost/mpl/eval_if.hpp> -#include <boost/mpl/inherit.hpp> -#include <boost/mpl/identity.hpp> - -namespace boost { namespace fusion -{ - struct reverse_view_tag; - struct fusion_sequence_tag; - - template <typename Sequence> - struct reverse_view : sequence_base<reverse_view<Sequence> > - { - typedef reverse_view_tag fusion_tag; - typedef fusion_sequence_tag tag; // this gets picked up by MPL - typedef mpl::true_ is_view; - - typedef Sequence seq_type; - typedef typename traits::category_of<Sequence>::type category; - typedef typename result_of::begin<Sequence>::type first_type; - typedef typename result_of::end<Sequence>::type last_type; - typedef typename result_of::size<Sequence>::type size; - - BOOST_STATIC_ASSERT(( - is_base_of< - bidirectional_traversal_tag - , typename traits::category_of<first_type>::type>::value)); - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - reverse_view(Sequence& in_seq) - : seq(in_seq) - {} - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - first_type first() const { return fusion::begin(seq); } - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - last_type last() const { return fusion::end(seq); } - typename mpl::if_<traits::is_view<Sequence>, Sequence, Sequence&>::type seq; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(reverse_view& operator= (reverse_view const&)) - }; -}} - -#endif - - diff --git a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp b/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp deleted file mode 100644 index 0a582f4032..0000000000 --- a/contrib/restricted/boost/fusion/include/boost/fusion/view/reverse_view/reverse_view_iterator.hpp +++ /dev/null @@ -1,66 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - - 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) -==============================================================================*/ -#if !defined(FUSION_REVERSE_VIEW_ITERATOR_07202005_0835) -#define FUSION_REVERSE_VIEW_ITERATOR_07202005_0835 - -#include <boost/fusion/support/config.hpp> -#include <boost/fusion/support/iterator_base.hpp> -#include <boost/fusion/support/category_of.hpp> -#include <boost/fusion/iterator/mpl/convert_iterator.hpp> -#include <boost/fusion/adapted/mpl/mpl_iterator.hpp> -#include <boost/fusion/view/reverse_view/detail/deref_impl.hpp> -#include <boost/fusion/view/reverse_view/detail/next_impl.hpp> -#include <boost/fusion/view/reverse_view/detail/prior_impl.hpp> -#include <boost/fusion/view/reverse_view/detail/advance_impl.hpp> -#include <boost/fusion/view/reverse_view/detail/distance_impl.hpp> -#include <boost/fusion/view/reverse_view/detail/value_of_impl.hpp> -#include <boost/fusion/view/reverse_view/detail/deref_data_impl.hpp> -#include <boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp> -#include <boost/fusion/view/reverse_view/detail/key_of_impl.hpp> -#include <boost/type_traits/is_base_of.hpp> -#include <boost/static_assert.hpp> - -namespace boost { namespace fusion -{ - struct reverse_view_iterator_tag; - - template <typename First> - struct reverse_view_iterator - : iterator_base<reverse_view_iterator<First> > - { - typedef convert_iterator<First> converter; - typedef typename converter::type first_type; - typedef reverse_view_iterator_tag fusion_tag; - typedef typename traits::category_of<first_type>::type category; - - BOOST_STATIC_ASSERT(( - is_base_of< - bidirectional_traversal_tag - , category>::value)); - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - reverse_view_iterator(First const& in_first) - : first(converter::call(in_first)) {} - - first_type first; - - // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(reverse_view_iterator& operator= (reverse_view_iterator const&)) - }; -}} - -#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 -namespace std -{ - template <typename First> - struct iterator_traits< ::boost::fusion::reverse_view_iterator<First> > - { }; -} -#endif - -#endif - diff --git a/contrib/restricted/boost/phoenix/include/boost/phoenix/function.hpp b/contrib/restricted/boost/phoenix/include/boost/phoenix/function.hpp deleted file mode 100644 index 00307f0b43..0000000000 --- a/contrib/restricted/boost/phoenix/include/boost/phoenix/function.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/*============================================================================== - Copyright (c) 2001-2010 Joel de Guzman - - 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) -==============================================================================*/ -#ifndef BOOST_PHOENIX_FUNCTION_HPP -#define BOOST_PHOENIX_FUNCTION_HPP - -#include <boost/phoenix/version.hpp> -#include <boost/phoenix/function/function.hpp> -#include <boost/phoenix/function/adapt_callable.hpp> -#include <boost/phoenix/function/adapt_function.hpp> - -#endif diff --git a/contrib/restricted/boost/phoenix/include/boost/phoenix/function/adapt_callable.hpp b/contrib/restricted/boost/phoenix/include/boost/phoenix/function/adapt_callable.hpp deleted file mode 100644 index ac2f3ae5ca..0000000000 --- a/contrib/restricted/boost/phoenix/include/boost/phoenix/function/adapt_callable.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/*============================================================================== - Copyright (c) 2005-2010 Joel de Guzman - Copyright (c) 2011 Thomas Heller - - 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) -==============================================================================*/ -#ifndef BOOST_PHOENIX_FUNCTION_ADAPT_CALLABLE_HPP -#define BOOST_PHOENIX_FUNCTION_ADAPT_CALLABLE_HPP - -#include <boost/phoenix/core/limits.hpp> -#include <boost/phoenix/core/detail/function_eval.hpp> -#include <boost/preprocessor/repetition/repeat.hpp> - -#define BOOST_PHOENIX_ADAPT_CALLABLE_NULLARY(NAME, FUNC) \ - inline \ - boost::phoenix::detail::expression::function_eval<FUNC>::type const \ - NAME() \ - { \ - return boost::phoenix::detail::expression:: \ - function_eval<FUNC>::make(FUNC()); \ - } \ -/**/ - - -#define BOOST_PHOENIX_ADAPT_CALLABLE(NAME, FUNC, N) \ - template <BOOST_PHOENIX_typename_A(N)> \ - inline \ - typename \ - boost::phoenix::detail::expression::function_eval< \ - FUNC \ - , BOOST_PHOENIX_A(N)>::type const \ - NAME(BOOST_PHOENIX_A_const_ref_a(N)) \ - { \ - return boost::phoenix::detail::expression:: \ - function_eval<FUNC, BOOST_PHOENIX_A(N)>:: \ - make(FUNC(), BOOST_PHOENIX_a(N)); \ - } \ -/**/ - - -#define BOOST_PHOENIX_ADAPT_CALLABLE_VARARG(NAME, FUNC) \ - BOOST_PHOENIX_ADAPT_CALLABLE_NULLARY(NAME, FUNC) \ - BOOST_PP_REPEAT_FROM_TO( \ - 1 \ - , BOOST_PHOENIX_LIMIT \ - , BOOST_PHOENIX_ADAPT_CALLABLE_VARARG_R \ - , (NAME, FUNC) \ - ) \ -/**/ - -#define BOOST_PHOENIX_ADAPT_CALLABLE_VARARG_R(Z, N, D) \ - BOOST_PHOENIX_ADAPT_CALLABLE( \ - BOOST_PP_TUPLE_ELEM(2, 0, D) \ - , BOOST_PP_TUPLE_ELEM(2, 1, D) \ - , N \ - ) \ -/**/ - -#endif diff --git a/contrib/restricted/boost/phoenix/include/boost/phoenix/function/adapt_function.hpp b/contrib/restricted/boost/phoenix/include/boost/phoenix/function/adapt_function.hpp deleted file mode 100644 index 6428e8eaef..0000000000 --- a/contrib/restricted/boost/phoenix/include/boost/phoenix/function/adapt_function.hpp +++ /dev/null @@ -1,102 +0,0 @@ -/*============================================================================== - Copyright (c) 2005-2010 Joel de Guzman - Copyright (c) 2010 Thomas Heller - Copyright (c) 2015 John Fletcher - - 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) -==============================================================================*/ -#ifndef BOOST_PHOENIX_FUNCTION_ADAPT_FUNCTION_HPP -#define BOOST_PHOENIX_FUNCTION_ADAPT_FUNCTION_HPP - -#include <boost/phoenix/core/limits.hpp> -#include <boost/phoenix/core/detail/function_eval.hpp> -#include <boost/preprocessor/repetition/repeat.hpp> - -#define BOOST_PHOENIX_ADAPT_FUNCTION_NULLARY(RESULT, NAME, FUNC) \ - namespace detail0 \ - { \ - struct BOOST_PP_CAT(NAME, _impl_nullary) \ - { \ - typedef RESULT result_type; \ - \ - result_type \ - operator()() const \ - { \ - return FUNC(); \ - } \ - }; \ - } \ - \ - inline \ - boost::phoenix::detail::expression::function_eval< \ - detail0:: BOOST_PP_CAT(NAME, _impl_nullary) \ - >::type const \ - NAME() \ - { \ - return boost::phoenix::detail::expression:: \ - function_eval<detail0:: BOOST_PP_CAT(NAME, _impl_nullary)> \ - ::make(detail0:: BOOST_PP_CAT(NAME, _impl_nullary)()); \ - } \ -/**/ - -#define BOOST_PHOENIX_ADAPT_FUNCTION(RESULT, NAME, FUNC, N) \ - namespace detail1 \ - { \ - struct BOOST_PP_CAT(BOOST_PP_CAT(NAME, _impl_), N) \ - { \ - template <typename Sig> \ - struct result; \ - \ - template <typename This, BOOST_PHOENIX_typename_A(N)> \ - struct result<This(BOOST_PHOENIX_A(N))> \ - {typedef RESULT type;}; \ - \ - template <BOOST_PHOENIX_typename_A(N)> \ - RESULT \ - operator()(BOOST_PHOENIX_A_ref_a(N)) const \ - { \ - return FUNC(BOOST_PHOENIX_a(N)); \ - } \ - }; \ - } \ - \ - template <BOOST_PHOENIX_typename_A(N)> \ - inline \ - typename \ - boost::phoenix::detail::expression::function_eval< \ - detail1:: BOOST_PP_CAT(BOOST_PP_CAT(NAME, _impl_), N) \ - , BOOST_PHOENIX_A(N)>::type const \ - NAME(BOOST_PHOENIX_A_const_ref_a(N)) \ - { \ - return boost::phoenix::detail::expression:: \ - function_eval< \ - detail1:: BOOST_PP_CAT(BOOST_PP_CAT(NAME, _impl_), N) \ - , BOOST_PHOENIX_A(N) \ - >::make( \ - detail1:: BOOST_PP_CAT(BOOST_PP_CAT(NAME, _impl_), N)() \ - , BOOST_PHOENIX_a(N) \ - ); \ - } \ -/**/ - -#define BOOST_PHOENIX_ADAPT_FUNCTION_VARARG(RESULT, NAME, FUNC) \ - BOOST_PHOENIX_ADAPT_FUNCTION_NULLARY(NAME, FUNC) \ - BOOST_PP_REPEAT_FROM_TO( \ - 1 \ - , BOOST_PHOENIX_LIMIT \ - , BOOST_PHOENIX_ADAPT_FUNCTION_VARARG_R \ - , (RESULT, NAME, FUNC) \ - ) \ -/**/ - -#define BOOST_PHOENIX_ADAPT_FUNCTION_VARARG_R(Z, N, D) \ - BOOST_PHOENIX_ADAPT_FUNCTION( \ - BOOST_PP_TUPLE_ELEM(3, 0, D) \ - , BOOST_PP_TUPLE_ELEM(3, 1, D) \ - , BOOST_PP_TUPLE_ELEM(3, 2, D) \ - , N \ - ) \ -/**/ - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/context.hpp b/contrib/restricted/boost/proto/include/boost/proto/context.hpp deleted file mode 100644 index 8ac92006b0..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/context.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file context.hpp -/// Includes all the context classes in the context/ sub-directory. -// -// Copyright 2008 Eric Niebler. 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) - -#ifndef BOOST_PROTO_CONTEXT_HPP_EAN_06_23_2007 -#define BOOST_PROTO_CONTEXT_HPP_EAN_06_23_2007 - -#include <boost/proto/context/null.hpp> -#include <boost/proto/context/default.hpp> -#include <boost/proto/context/callable.hpp> - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/context/callable.hpp b/contrib/restricted/boost/proto/include/boost/proto/context/callable.hpp deleted file mode 100644 index 3d6c1971f3..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/context/callable.hpp +++ /dev/null @@ -1,229 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file callable.hpp -/// Definintion of callable_context\<\>, an evaluation context for -/// proto::eval() that explodes each node and calls the derived context -/// type with the expressions constituents. If the derived context doesn't -/// have an overload that handles this node, fall back to some other -/// context. -// -// Copyright 2008 Eric Niebler. 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) - -#ifndef BOOST_PROTO_CONTEXT_CALLABLE_HPP_EAN_06_23_2007 -#define BOOST_PROTO_CONTEXT_CALLABLE_HPP_EAN_06_23_2007 - -#include <boost/config.hpp> -#include <boost/detail/workaround.hpp> -#include <boost/preprocessor/cat.hpp> -#include <boost/preprocessor/iteration/iterate.hpp> -#include <boost/preprocessor/facilities/intercept.hpp> -#include <boost/preprocessor/repetition/repeat.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_trailing.hpp> -#include <boost/preprocessor/repetition/enum_trailing_params.hpp> -#include <boost/preprocessor/arithmetic/inc.hpp> -#include <boost/preprocessor/selection/max.hpp> -#include <boost/mpl/if.hpp> -#include <boost/mpl/bool.hpp> -#include <boost/utility/result_of.hpp> -#include <boost/type_traits/remove_cv.hpp> -#include <boost/proto/proto_fwd.hpp> -#include <boost/proto/traits.hpp> // for child_c - -namespace boost { namespace proto -{ - namespace detail - { - template<typename Context> - struct callable_context_wrapper - : remove_cv<Context>::type - { - callable_context_wrapper(); - typedef private_type_ fun_type(...); - operator fun_type *() const; - - BOOST_DELETED_FUNCTION(callable_context_wrapper &operator =(callable_context_wrapper const &)) - }; - - template<typename T> - yes_type check_is_expr_handled(T const &); - - no_type check_is_expr_handled(private_type_ const &); - - template<typename Expr, typename Context, long Arity = Expr::proto_arity_c> - struct is_expr_handled; - - template<typename Expr, typename Context> - struct is_expr_handled<Expr, Context, 0> - { - static callable_context_wrapper<Context> &sctx_; - static Expr &sexpr_; - static typename Expr::proto_tag &stag_; - - static const bool value = - sizeof(yes_type) == - sizeof( - detail::check_is_expr_handled( - (sctx_(stag_, proto::value(sexpr_)), 0) - ) - ); - - typedef mpl::bool_<value> type; - }; - } - - namespace context - { - /// \brief A BinaryFunction that accepts a Proto expression and a - /// callable context and calls the context with the expression tag - /// and children as arguments, effectively fanning the expression - /// out. - /// - /// <tt>callable_eval\<\></tt> requires that \c Context is a - /// PolymorphicFunctionObject that can be invoked with \c Expr's - /// tag and children as expressions, as follows: - /// - /// \code - /// context(Expr::proto_tag(), child_c<0>(expr), child_c<1>(expr), ...) - /// \endcode - template< - typename Expr - , typename Context - , long Arity // = Expr::proto_arity_c - > - struct callable_eval - {}; - - /// \brief A BinaryFunction that accepts a Proto expression and a - /// callable context and calls the context with the expression tag - /// and children as arguments, effectively fanning the expression - /// out. - /// - /// <tt>callable_eval\<\></tt> requires that \c Context is a - /// PolymorphicFunctionObject that can be invoked with \c Expr's - /// tag and children as expressions, as follows: - /// - /// \code - /// context(Expr::proto_tag(), value(expr)) - /// \endcode - template<typename Expr, typename Context> - struct callable_eval<Expr, Context, 0> - { - typedef typename proto::result_of::value<Expr const &>::type value_type; - - typedef - typename BOOST_PROTO_RESULT_OF< - Context(typename Expr::proto_tag, value_type) - >::type - result_type; - - /// \param expr The current expression - /// \param context The callable evaluation context - /// \return <tt>context(Expr::proto_tag(), value(expr))</tt> - result_type operator ()(Expr &expr, Context &context) const - { - return context(typename Expr::proto_tag(), proto::value(expr)); - } - }; - - /// \brief An evaluation context adaptor that makes authoring a - /// context a simple matter of writing function overloads, rather - /// then writing template specializations. - /// - /// <tt>callable_context\<\></tt> is a base class that implements - /// the context protocol by passing fanned-out expression nodes to - /// the derived context, making it easy to customize the handling - /// of expression types by writing function overloads. Only those - /// expression types needing special handling require explicit - /// handling. All others are dispatched to a user-specified - /// default context, \c DefaultCtx. - /// - /// <tt>callable_context\<\></tt> is defined simply as: - /// - /// \code - /// template<typename Context, typename DefaultCtx = default_context> - /// struct callable_context - /// { - /// template<typename Expr, typename ThisContext = Context> - /// struct eval - /// : mpl::if_< - /// is_expr_handled_<Expr, Context> // For exposition - /// , callable_eval<Expr, ThisContext> - /// , typename DefaultCtx::template eval<Expr, Context> - /// >::type - /// {}; - /// }; - /// \endcode - /// - /// The Boolean metafunction <tt>is_expr_handled_\<\></tt> uses - /// metaprogramming tricks to determine whether \c Context has - /// an overloaded function call operator that accepts the - /// fanned-out constituents of an expression of type \c Expr. - /// If so, the handling of the expression is dispatched to - /// <tt>callable_eval\<\></tt>. If not, it is dispatched to - /// the user-specified \c DefaultCtx. - /// - /// Below is an example of how to use <tt>callable_context\<\></tt>: - /// - /// \code - /// // An evaluation context that increments all - /// // integer terminals in-place. - /// struct increment_ints - /// : callable_context< - /// increment_ints const // derived context - /// , null_context const // fall-back context - /// > - /// { - /// typedef void result_type; - /// - /// // Handle int terminals here: - /// void operator()(proto::tag::terminal, int &i) const - /// { - /// ++i; - /// } - /// }; - /// \endcode - /// - /// With \c increment_ints, we can do the following: - /// - /// \code - /// literal<int> i = 0, j = 10; - /// proto::eval( i - j * 3.14, increment_ints() ); - /// - /// assert( i.get() == 1 && j.get() == 11 ); - /// \endcode - template< - typename Context - , typename DefaultCtx // = default_context - > - struct callable_context - { - /// A BinaryFunction that accepts an \c Expr and a - /// \c Context, and either fans out the expression and passes - /// it to the context, or else hands off the expression to - /// \c DefaultCtx. - /// - /// If \c Context is a PolymorphicFunctionObject such that - /// it can be invoked with the tag and children of \c Expr, - /// as <tt>ctx(Expr::proto_tag(), child_c\<0\>(expr), child_c\<1\>(expr)...)</tt>, - /// then <tt>eval\<Expr, ThisContext\></tt> inherits from - /// <tt>callable_eval\<Expr, ThisContext\></tt>. Otherwise, - /// <tt>eval\<Expr, ThisContext\></tt> inherits from - /// <tt>DefaultCtx::eval\<Expr, Context\></tt>. - template<typename Expr, typename ThisContext = Context> - struct eval - : mpl::if_c< - detail::is_expr_handled<Expr, Context>::value - , callable_eval<Expr, ThisContext> - , typename DefaultCtx::template eval<Expr, Context> - >::type - {}; - }; - } - - #include <boost/proto/context/detail/callable_eval.hpp> - -}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/context/default.hpp b/contrib/restricted/boost/proto/include/boost/proto/context/default.hpp deleted file mode 100644 index f3e586f0e8..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/context/default.hpp +++ /dev/null @@ -1,409 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file default.hpp -/// Definintion of default_context, a default evaluation context for -/// proto::eval() that uses Boost.Typeof to deduce return types -/// of the built-in operators. -// -// Copyright 2008 Eric Niebler. 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) - -#ifndef BOOST_PROTO_CONTEXT_DEFAULT_HPP_EAN_01_08_2007 -#define BOOST_PROTO_CONTEXT_DEFAULT_HPP_EAN_01_08_2007 - -#include <boost/config.hpp> -#include <boost/preprocessor/arithmetic/add.hpp> -#include <boost/preprocessor/arithmetic/sub.hpp> -#include <boost/preprocessor/iteration/iterate.hpp> -#include <boost/preprocessor/repetition/enum.hpp> -#include <boost/preprocessor/repetition/enum_shifted.hpp> -#include <boost/utility/result_of.hpp> -#include <boost/type_traits/is_const.hpp> -#include <boost/type_traits/is_function.hpp> -#include <boost/type_traits/remove_reference.hpp> -#include <boost/type_traits/is_member_pointer.hpp> -#include <boost/type_traits/is_member_object_pointer.hpp> -#include <boost/type_traits/is_member_function_pointer.hpp> -#include <boost/proto/proto_fwd.hpp> -#include <boost/proto/tags.hpp> -#include <boost/proto/eval.hpp> -#include <boost/proto/traits.hpp> // for proto::child_c() -#include <boost/proto/detail/decltype.hpp> - -namespace boost { namespace proto -{ -/// INTERNAL ONLY -/// -#define UNREF(x) typename boost::remove_reference<x>::type - - namespace context - { - template< - typename Expr - , typename Context - , typename Tag // = typename Expr::proto_tag - , long Arity // = Expr::proto_arity_c - > - struct default_eval - {}; - - template<typename Expr, typename Context> - struct default_eval<Expr, Context, tag::terminal, 0> - { - typedef - typename proto::result_of::value<Expr &>::type - result_type; - - result_type operator ()(Expr &expr, Context &) const - { - return proto::value(expr); - } - }; - - /// INTERNAL ONLY - /// - #define BOOST_PROTO_UNARY_DEFAULT_EVAL(OP, TAG, MAKE) \ - template<typename Expr, typename Context> \ - struct default_eval<Expr, Context, TAG, 1> \ - { \ - private: \ - typedef typename proto::result_of::child_c<Expr, 0>::type e0; \ - typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0; \ - public: \ - BOOST_PROTO_DECLTYPE_(OP proto::detail::MAKE<r0>(), result_type) \ - result_type operator ()(Expr &expr, Context &ctx) const \ - { \ - return OP proto::eval(proto::child_c<0>(expr), ctx); \ - } \ - }; \ - /**/ - - /// INTERNAL ONLY - /// - #define BOOST_PROTO_BINARY_DEFAULT_EVAL(OP, TAG, LMAKE, RMAKE) \ - template<typename Expr, typename Context> \ - struct default_eval<Expr, Context, TAG, 2> \ - { \ - private: \ - typedef typename proto::result_of::child_c<Expr, 0>::type e0; \ - typedef typename proto::result_of::child_c<Expr, 1>::type e1; \ - typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0; \ - typedef typename proto::result_of::eval<UNREF(e1), Context>::type r1; \ - public: \ - BOOST_PROTO_DECLTYPE_( \ - proto::detail::LMAKE<r0>() OP proto::detail::RMAKE<r1>() \ - , result_type \ - ) \ - result_type operator ()(Expr &expr, Context &ctx) const \ - { \ - return proto::eval( \ - proto::child_c<0>(expr), ctx) OP proto::eval(proto::child_c<1>(expr) \ - , ctx \ - ); \ - } \ - }; \ - /**/ - - BOOST_PROTO_UNARY_DEFAULT_EVAL(+, proto::tag::unary_plus, make) - BOOST_PROTO_UNARY_DEFAULT_EVAL(-, proto::tag::negate, make) - BOOST_PROTO_UNARY_DEFAULT_EVAL(*, proto::tag::dereference, make) - BOOST_PROTO_UNARY_DEFAULT_EVAL(~, proto::tag::complement, make) - BOOST_PROTO_UNARY_DEFAULT_EVAL(&, proto::tag::address_of, make) - BOOST_PROTO_UNARY_DEFAULT_EVAL(!, proto::tag::logical_not, make) - BOOST_PROTO_UNARY_DEFAULT_EVAL(++, proto::tag::pre_inc, make_mutable) - BOOST_PROTO_UNARY_DEFAULT_EVAL(--, proto::tag::pre_dec, make_mutable) - - BOOST_PROTO_BINARY_DEFAULT_EVAL(<<, proto::tag::shift_left, make_mutable, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(>>, proto::tag::shift_right, make_mutable, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(*, proto::tag::multiplies, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(/, proto::tag::divides, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(%, proto::tag::modulus, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(+, proto::tag::plus, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(-, proto::tag::minus, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(<, proto::tag::less, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(>, proto::tag::greater, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(<=, proto::tag::less_equal, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(>=, proto::tag::greater_equal, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(==, proto::tag::equal_to, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(!=, proto::tag::not_equal_to, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(||, proto::tag::logical_or, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(&&, proto::tag::logical_and, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(&, proto::tag::bitwise_and, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(|, proto::tag::bitwise_or, make, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(^, proto::tag::bitwise_xor, make, make) - - BOOST_PROTO_BINARY_DEFAULT_EVAL(=, proto::tag::assign, make_mutable, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(<<=, proto::tag::shift_left_assign, make_mutable, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(>>=, proto::tag::shift_right_assign, make_mutable, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(*=, proto::tag::multiplies_assign, make_mutable, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(/=, proto::tag::divides_assign, make_mutable, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(%=, proto::tag::modulus_assign, make_mutable, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(+=, proto::tag::plus_assign, make_mutable, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(-=, proto::tag::minus_assign, make_mutable, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(&=, proto::tag::bitwise_and_assign, make_mutable, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(|=, proto::tag::bitwise_or_assign, make_mutable, make) - BOOST_PROTO_BINARY_DEFAULT_EVAL(^=, proto::tag::bitwise_xor_assign, make_mutable, make) - - #undef BOOST_PROTO_UNARY_DEFAULT_EVAL - #undef BOOST_PROTO_BINARY_DEFAULT_EVAL - - /// INTERNAL ONLY - template<typename Expr, typename Context> - struct is_member_function_eval - : is_member_function_pointer< - typename detail::uncvref< - typename proto::result_of::eval< - typename remove_reference< - typename proto::result_of::child_c<Expr, 1>::type - >::type - , Context - >::type - >::type - > - {}; - - /// INTERNAL ONLY - template<typename Expr, typename Context, bool IsMemFunCall> - struct memfun_eval - { - private: - typedef typename result_of::child_c<Expr, 0>::type e0; - typedef typename result_of::child_c<Expr, 1>::type e1; - typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0; - typedef typename proto::result_of::eval<UNREF(e1), Context>::type r1; - public: - typedef typename detail::mem_ptr_fun<r0, r1>::result_type result_type; - result_type operator ()(Expr &expr, Context &ctx) const - { - return detail::mem_ptr_fun<r0, r1>()( - proto::eval(proto::child_c<0>(expr), ctx) - , proto::eval(proto::child_c<1>(expr), ctx) - ); - } - }; - - /// INTERNAL ONLY - template<typename Expr, typename Context> - struct memfun_eval<Expr, Context, true> - { - private: - typedef typename result_of::child_c<Expr, 0>::type e0; - typedef typename result_of::child_c<Expr, 1>::type e1; - typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0; - typedef typename proto::result_of::eval<UNREF(e1), Context>::type r1; - public: - typedef detail::memfun<r0, r1> result_type; - result_type const operator ()(Expr &expr, Context &ctx) const - { - return detail::memfun<r0, r1>( - proto::eval(proto::child_c<0>(expr), ctx) - , proto::eval(proto::child_c<1>(expr), ctx) - ); - } - }; - - template<typename Expr, typename Context> - struct default_eval<Expr, Context, tag::mem_ptr, 2> - : memfun_eval<Expr, Context, is_member_function_eval<Expr, Context>::value> - {}; - - // Handle post-increment specially. - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::post_inc, 1> - { - private: - typedef typename proto::result_of::child_c<Expr, 0>::type e0; - typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0; - public: - BOOST_PROTO_DECLTYPE_(proto::detail::make_mutable<r0>() ++, result_type) - result_type operator ()(Expr &expr, Context &ctx) const - { - return proto::eval(proto::child_c<0>(expr), ctx) ++; - } - }; - - // Handle post-decrement specially. - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::post_dec, 1> - { - private: - typedef typename proto::result_of::child_c<Expr, 0>::type e0; - typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0; - public: - BOOST_PROTO_DECLTYPE_(proto::detail::make_mutable<r0>() --, result_type) - result_type operator ()(Expr &expr, Context &ctx) const - { - return proto::eval(proto::child_c<0>(expr), ctx) --; - } - }; - - // Handle subscript specially. - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::subscript, 2> - { - private: - typedef typename proto::result_of::child_c<Expr, 0>::type e0; - typedef typename proto::result_of::child_c<Expr, 1>::type e1; - typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0; - typedef typename proto::result_of::eval<UNREF(e1), Context>::type r1; - public: - BOOST_PROTO_DECLTYPE_(proto::detail::make_subscriptable<r0>()[proto::detail::make<r1>()], result_type) - result_type operator ()(Expr &expr, Context &ctx) const - { - return proto::eval(proto::child_c<0>(expr), ctx)[proto::eval(proto::child_c<1>(expr), ctx)]; - } - }; - - // Handle if_else_ specially. - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::if_else_, 3> - { - private: - typedef typename proto::result_of::child_c<Expr, 0>::type e0; - typedef typename proto::result_of::child_c<Expr, 1>::type e1; - typedef typename proto::result_of::child_c<Expr, 2>::type e2; - typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0; - typedef typename proto::result_of::eval<UNREF(e1), Context>::type r1; - typedef typename proto::result_of::eval<UNREF(e2), Context>::type r2; - public: - BOOST_PROTO_DECLTYPE_( - proto::detail::make<r0>() - ? proto::detail::make<r1>() - : proto::detail::make<r2>() - , result_type - ) - result_type operator ()(Expr &expr, Context &ctx) const - { - return proto::eval(proto::child_c<0>(expr), ctx) - ? proto::eval(proto::child_c<1>(expr), ctx) - : proto::eval(proto::child_c<2>(expr), ctx); - } - }; - - // Handle comma specially. - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::comma, 2> - { - private: - typedef typename proto::result_of::child_c<Expr, 0>::type e0; - typedef typename proto::result_of::child_c<Expr, 1>::type e1; - typedef typename proto::result_of::eval<UNREF(e0), Context>::type r0; - typedef typename proto::result_of::eval<UNREF(e1), Context>::type r1; - public: - typedef typename proto::detail::comma_result<r0, r1>::type result_type; - result_type operator ()(Expr &expr, Context &ctx) const - { - return proto::eval(proto::child_c<0>(expr), ctx), proto::eval(proto::child_c<1>(expr), ctx); - } - }; - - // Handle function specially - #define BOOST_PROTO_DEFAULT_EVAL_TYPE(Z, N, DATA) \ - typename proto::result_of::eval< \ - typename remove_reference< \ - typename proto::result_of::child_c<DATA, N>::type \ - >::type \ - , Context \ - >::type \ - /**/ - - #define BOOST_PROTO_DEFAULT_EVAL(Z, N, DATA) \ - proto::eval(proto::child_c<N>(DATA), context) \ - /**/ - - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::function, 1> - { - typedef - typename proto::detail::result_of_fixup< - BOOST_PROTO_DEFAULT_EVAL_TYPE(~, 0, Expr) - >::type - function_type; - - typedef - typename BOOST_PROTO_RESULT_OF<function_type()>::type - result_type; - - result_type operator ()(Expr &expr, Context &context) const - { - return BOOST_PROTO_DEFAULT_EVAL(~, 0, expr)(); - } - }; - - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::function, 2> - { - typedef - typename proto::detail::result_of_fixup< - BOOST_PROTO_DEFAULT_EVAL_TYPE(~, 0, Expr) - >::type - function_type; - - typedef - typename detail::result_of_< - function_type(BOOST_PROTO_DEFAULT_EVAL_TYPE(~, 1, Expr)) - >::type - result_type; - - result_type operator ()(Expr &expr, Context &context) const - { - return this->invoke( - expr - , context - , is_member_function_pointer<function_type>() - , is_member_object_pointer<function_type>() - ); - } - - private: - result_type invoke(Expr &expr, Context &context, mpl::false_, mpl::false_) const - { - return BOOST_PROTO_DEFAULT_EVAL(~, 0, expr)(BOOST_PROTO_DEFAULT_EVAL(~, 1, expr)); - } - - result_type invoke(Expr &expr, Context &context, mpl::true_, mpl::false_) const - { - BOOST_PROTO_USE_GET_POINTER(); - typedef typename detail::class_member_traits<function_type>::class_type class_type; - return ( - BOOST_PROTO_GET_POINTER(class_type, (BOOST_PROTO_DEFAULT_EVAL(~, 1, expr))) ->* - BOOST_PROTO_DEFAULT_EVAL(~, 0, expr) - )(); - } - - result_type invoke(Expr &expr, Context &context, mpl::false_, mpl::true_) const - { - BOOST_PROTO_USE_GET_POINTER(); - typedef typename detail::class_member_traits<function_type>::class_type class_type; - return ( - BOOST_PROTO_GET_POINTER(class_type, (BOOST_PROTO_DEFAULT_EVAL(~, 1, expr))) ->* - BOOST_PROTO_DEFAULT_EVAL(~, 0, expr) - ); - } - }; - - // Additional specialization are generated by the preprocessor - #include <boost/proto/context/detail/default_eval.hpp> - - #undef BOOST_PROTO_DEFAULT_EVAL_TYPE - #undef BOOST_PROTO_DEFAULT_EVAL - - /// default_context - /// - struct default_context - { - /// default_context::eval - /// - template<typename Expr, typename ThisContext = default_context const> - struct eval - : default_eval<Expr, ThisContext> - {}; - }; - - } // namespace context - -}} // namespace boost::proto - -#undef UNREF - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/context/detail/callable_eval.hpp b/contrib/restricted/boost/proto/include/boost/proto/context/detail/callable_eval.hpp deleted file mode 100644 index abe7803b0b..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/context/detail/callable_eval.hpp +++ /dev/null @@ -1,113 +0,0 @@ -#if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES) - - #include <boost/proto/context/detail/preprocessed/callable_eval.hpp> - -#elif !defined(BOOST_PP_IS_ITERATING) - - #define BOOST_PROTO_CHILD_N_TYPE(Z, N, Expr) \ - typedef typename proto::result_of::child_c<Expr const &, N>::type BOOST_PP_CAT(child, N); \ - /**/ - - #define BOOST_PROTO_CHILD_N(Z, N, expr) \ - proto::child_c<N>(expr) \ - /**/ - - #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) - #pragma wave option(preserve: 2, line: 0, output: "preprocessed/callable_eval.hpp") - #endif - - /////////////////////////////////////////////////////////////////////////////// - /// \file callable_eval.hpp - /// Contains specializations of the callable_eval\<\> class template. - // - // Copyright 2008 Eric Niebler. 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) - - #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) - #pragma wave option(preserve: 1) - #endif - - #define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/context/detail/callable_eval.hpp>)) - #include BOOST_PP_ITERATE() - - #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) - #pragma wave option(output: null) - #endif - - #undef BOOST_PROTO_CHILD_N_TYPE - #undef BOOST_PROTO_CHILD_N - -#else - - #define N BOOST_PP_ITERATION() - - namespace detail - { - template<typename Expr, typename Context> - struct is_expr_handled<Expr, Context, N> - { - static callable_context_wrapper<Context> &sctx_; - static Expr &sexpr_; - static typename Expr::proto_tag &stag_; - - static const bool value = - sizeof(yes_type) == - sizeof( - detail::check_is_expr_handled( - (sctx_( - stag_ - BOOST_PP_ENUM_TRAILING(N, BOOST_PROTO_CHILD_N, sexpr_) - ), 0) - ) - ); - - typedef mpl::bool_<value> type; - }; - } - - namespace context - { - /// \brief A BinaryFunction that accepts a Proto expression and a - /// callable context and calls the context with the expression tag - /// and children as arguments, effectively fanning the expression - /// out. - /// - /// <tt>callable_eval\<\></tt> requires that \c Context is a - /// PolymorphicFunctionObject that can be invoked with \c Expr's - /// tag and children as expressions, as follows: - /// - /// \code - /// context(Expr::proto_tag(), child_c\<0\>(expr), child_c\<1\>(expr), ...) - /// \endcode - template<typename Expr, typename Context> - struct callable_eval<Expr, Context, N> - { - BOOST_PP_REPEAT(N, BOOST_PROTO_CHILD_N_TYPE, Expr) - - typedef - typename BOOST_PROTO_RESULT_OF< - Context( - typename Expr::proto_tag - BOOST_PP_ENUM_TRAILING_PARAMS(N, child) - ) - >::type - result_type; - - /// \param expr The current expression - /// \param context The callable evaluation context - /// \return <tt>context(Expr::proto_tag(), child_c\<0\>(expr), child_c\<1\>(expr), ...)</tt> - result_type operator ()(Expr &expr, Context &context) const - { - return context( - typename Expr::proto_tag() - BOOST_PP_ENUM_TRAILING(N, BOOST_PROTO_CHILD_N, expr) - ); - } - }; - } - - #undef N - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/context/detail/default_eval.hpp b/contrib/restricted/boost/proto/include/boost/proto/context/detail/default_eval.hpp deleted file mode 100644 index 980427604e..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/context/detail/default_eval.hpp +++ /dev/null @@ -1,82 +0,0 @@ -#if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES) - - #include <boost/proto/context/detail/preprocessed/default_eval.hpp> - -#elif !defined(BOOST_PP_IS_ITERATING) - - #define BOOST_PROTO_DEFAULT_EVAL_SHIFTED(Z, M, DATA) \ - BOOST_PROTO_DEFAULT_EVAL(Z, BOOST_PP_ADD(M, 2), DATA) \ - /**/ - - #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) - #pragma wave option(preserve: 2, line: 0, output: "preprocessed/default_eval.hpp") - #endif - - /////////////////////////////////////////////////////////////////////////////// - /// \file default_eval.hpp - /// Contains specializations of the default_eval\<\> class template. - // - // Copyright 2008 Eric Niebler. 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) - - #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) - #pragma wave option(preserve: 1) - #endif - - #define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (3, BOOST_PROTO_MAX_ARITY, <boost/proto/context/detail/default_eval.hpp>)) - #include BOOST_PP_ITERATE() - - #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) - #pragma wave option(output: null) - #endif - - #undef BOOST_PROTO_DEFAULT_EVAL_SHIFTED - -#else - - #define N BOOST_PP_ITERATION() - - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::function, N> - { - typedef - typename proto::detail::result_of_fixup< - BOOST_PROTO_DEFAULT_EVAL_TYPE(~, 0, Expr) - >::type - function_type; - - typedef - typename BOOST_PROTO_RESULT_OF< - function_type(BOOST_PP_ENUM_SHIFTED(N, BOOST_PROTO_DEFAULT_EVAL_TYPE, Expr)) - >::type - result_type; - - result_type operator ()(Expr &expr, Context &context) const - { - return this->invoke(expr, context, is_member_function_pointer<function_type>()); - } - - private: - result_type invoke(Expr &expr, Context &context, mpl::false_) const - { - return BOOST_PROTO_DEFAULT_EVAL(~, 0, expr)( - BOOST_PP_ENUM_SHIFTED(N, BOOST_PROTO_DEFAULT_EVAL, expr) - ); - } - - result_type invoke(Expr &expr, Context &context, mpl::true_) const - { - BOOST_PROTO_USE_GET_POINTER(); - typedef typename detail::class_member_traits<function_type>::class_type class_type; - return ( - BOOST_PROTO_GET_POINTER(class_type, (BOOST_PROTO_DEFAULT_EVAL(~, 1, expr))) ->* - BOOST_PROTO_DEFAULT_EVAL(~, 0, expr) - )(BOOST_PP_ENUM(BOOST_PP_SUB(N, 2), BOOST_PROTO_DEFAULT_EVAL_SHIFTED, expr)); - } - }; - - #undef N - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/context/detail/null_eval.hpp b/contrib/restricted/boost/proto/include/boost/proto/context/detail/null_eval.hpp deleted file mode 100644 index dcf0077af3..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/context/detail/null_eval.hpp +++ /dev/null @@ -1,54 +0,0 @@ -#if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES) - - #include <boost/proto/context/detail/preprocessed/null_eval.hpp> - -#elif !defined(BOOST_PP_IS_ITERATING) - - #define BOOST_PROTO_EVAL_N(Z, N, DATA) \ - proto::eval(proto::child_c<N>(expr), ctx); \ - /**/ - - #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) - #pragma wave option(preserve: 2, line: 0, output: "preprocessed/null_eval.hpp") - #endif - - /////////////////////////////////////////////////////////////////////////////// - /// \file null_eval.hpp - /// Contains specializations of the null_eval\<\> class template. - // - // Copyright 2008 Eric Niebler. 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) - - #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) - #pragma wave option(preserve: 1) - #endif - - #define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/context/detail/null_eval.hpp>)) - #include BOOST_PP_ITERATE() - - #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) - #pragma wave option(output: null) - #endif - - #undef BOOST_PROTO_EVAL_N - -#else - - #define N BOOST_PP_ITERATION() - - template<typename Expr, typename Context> - struct null_eval<Expr, Context, N> - { - typedef void result_type; - - void operator ()(Expr &expr, Context &ctx) const - { - BOOST_PP_REPEAT(N, BOOST_PROTO_EVAL_N, ~) - } - }; - - #undef N - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/context/detail/preprocessed/callable_eval.hpp b/contrib/restricted/boost/proto/include/boost/proto/context/detail/preprocessed/callable_eval.hpp deleted file mode 100644 index 5b32c8f469..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/context/detail/preprocessed/callable_eval.hpp +++ /dev/null @@ -1,597 +0,0 @@ - /////////////////////////////////////////////////////////////////////////////// - /// \file callable_eval.hpp - /// Contains specializations of the callable_eval\<\> class template. - // - // Copyright 2008 Eric Niebler. 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) - namespace detail - { - template<typename Expr, typename Context> - struct is_expr_handled<Expr, Context, 1> - { - static callable_context_wrapper<Context> &sctx_; - static Expr &sexpr_; - static typename Expr::proto_tag &stag_; - static const bool value = - sizeof(yes_type) == - sizeof( - detail::check_is_expr_handled( - (sctx_( - stag_ - , proto::child_c< 0>( sexpr_) - ), 0) - ) - ); - typedef mpl::bool_<value> type; - }; - } - namespace context - { - - - - - - - - - - - - - template<typename Expr, typename Context> - struct callable_eval<Expr, Context, 1> - { - typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; - typedef - typename BOOST_PROTO_RESULT_OF< - Context( - typename Expr::proto_tag - , child0 - ) - >::type - result_type; - - - - result_type operator ()(Expr &expr, Context &context) const - { - return context( - typename Expr::proto_tag() - , proto::child_c< 0>( expr) - ); - } - }; - } - namespace detail - { - template<typename Expr, typename Context> - struct is_expr_handled<Expr, Context, 2> - { - static callable_context_wrapper<Context> &sctx_; - static Expr &sexpr_; - static typename Expr::proto_tag &stag_; - static const bool value = - sizeof(yes_type) == - sizeof( - detail::check_is_expr_handled( - (sctx_( - stag_ - , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) - ), 0) - ) - ); - typedef mpl::bool_<value> type; - }; - } - namespace context - { - - - - - - - - - - - - - template<typename Expr, typename Context> - struct callable_eval<Expr, Context, 2> - { - typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; - typedef - typename BOOST_PROTO_RESULT_OF< - Context( - typename Expr::proto_tag - , child0 , child1 - ) - >::type - result_type; - - - - result_type operator ()(Expr &expr, Context &context) const - { - return context( - typename Expr::proto_tag() - , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) - ); - } - }; - } - namespace detail - { - template<typename Expr, typename Context> - struct is_expr_handled<Expr, Context, 3> - { - static callable_context_wrapper<Context> &sctx_; - static Expr &sexpr_; - static typename Expr::proto_tag &stag_; - static const bool value = - sizeof(yes_type) == - sizeof( - detail::check_is_expr_handled( - (sctx_( - stag_ - , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) - ), 0) - ) - ); - typedef mpl::bool_<value> type; - }; - } - namespace context - { - - - - - - - - - - - - - template<typename Expr, typename Context> - struct callable_eval<Expr, Context, 3> - { - typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; - typedef - typename BOOST_PROTO_RESULT_OF< - Context( - typename Expr::proto_tag - , child0 , child1 , child2 - ) - >::type - result_type; - - - - result_type operator ()(Expr &expr, Context &context) const - { - return context( - typename Expr::proto_tag() - , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) - ); - } - }; - } - namespace detail - { - template<typename Expr, typename Context> - struct is_expr_handled<Expr, Context, 4> - { - static callable_context_wrapper<Context> &sctx_; - static Expr &sexpr_; - static typename Expr::proto_tag &stag_; - static const bool value = - sizeof(yes_type) == - sizeof( - detail::check_is_expr_handled( - (sctx_( - stag_ - , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) - ), 0) - ) - ); - typedef mpl::bool_<value> type; - }; - } - namespace context - { - - - - - - - - - - - - - template<typename Expr, typename Context> - struct callable_eval<Expr, Context, 4> - { - typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; - typedef - typename BOOST_PROTO_RESULT_OF< - Context( - typename Expr::proto_tag - , child0 , child1 , child2 , child3 - ) - >::type - result_type; - - - - result_type operator ()(Expr &expr, Context &context) const - { - return context( - typename Expr::proto_tag() - , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) - ); - } - }; - } - namespace detail - { - template<typename Expr, typename Context> - struct is_expr_handled<Expr, Context, 5> - { - static callable_context_wrapper<Context> &sctx_; - static Expr &sexpr_; - static typename Expr::proto_tag &stag_; - static const bool value = - sizeof(yes_type) == - sizeof( - detail::check_is_expr_handled( - (sctx_( - stag_ - , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) - ), 0) - ) - ); - typedef mpl::bool_<value> type; - }; - } - namespace context - { - - - - - - - - - - - - - template<typename Expr, typename Context> - struct callable_eval<Expr, Context, 5> - { - typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; - typedef - typename BOOST_PROTO_RESULT_OF< - Context( - typename Expr::proto_tag - , child0 , child1 , child2 , child3 , child4 - ) - >::type - result_type; - - - - result_type operator ()(Expr &expr, Context &context) const - { - return context( - typename Expr::proto_tag() - , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) - ); - } - }; - } - namespace detail - { - template<typename Expr, typename Context> - struct is_expr_handled<Expr, Context, 6> - { - static callable_context_wrapper<Context> &sctx_; - static Expr &sexpr_; - static typename Expr::proto_tag &stag_; - static const bool value = - sizeof(yes_type) == - sizeof( - detail::check_is_expr_handled( - (sctx_( - stag_ - , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) - ), 0) - ) - ); - typedef mpl::bool_<value> type; - }; - } - namespace context - { - - - - - - - - - - - - - template<typename Expr, typename Context> - struct callable_eval<Expr, Context, 6> - { - typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; - typedef - typename BOOST_PROTO_RESULT_OF< - Context( - typename Expr::proto_tag - , child0 , child1 , child2 , child3 , child4 , child5 - ) - >::type - result_type; - - - - result_type operator ()(Expr &expr, Context &context) const - { - return context( - typename Expr::proto_tag() - , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) - ); - } - }; - } - namespace detail - { - template<typename Expr, typename Context> - struct is_expr_handled<Expr, Context, 7> - { - static callable_context_wrapper<Context> &sctx_; - static Expr &sexpr_; - static typename Expr::proto_tag &stag_; - static const bool value = - sizeof(yes_type) == - sizeof( - detail::check_is_expr_handled( - (sctx_( - stag_ - , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_) - ), 0) - ) - ); - typedef mpl::bool_<value> type; - }; - } - namespace context - { - - - - - - - - - - - - - template<typename Expr, typename Context> - struct callable_eval<Expr, Context, 7> - { - typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6; - typedef - typename BOOST_PROTO_RESULT_OF< - Context( - typename Expr::proto_tag - , child0 , child1 , child2 , child3 , child4 , child5 , child6 - ) - >::type - result_type; - - - - result_type operator ()(Expr &expr, Context &context) const - { - return context( - typename Expr::proto_tag() - , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr) - ); - } - }; - } - namespace detail - { - template<typename Expr, typename Context> - struct is_expr_handled<Expr, Context, 8> - { - static callable_context_wrapper<Context> &sctx_; - static Expr &sexpr_; - static typename Expr::proto_tag &stag_; - static const bool value = - sizeof(yes_type) == - sizeof( - detail::check_is_expr_handled( - (sctx_( - stag_ - , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_) , proto::child_c< 7>( sexpr_) - ), 0) - ) - ); - typedef mpl::bool_<value> type; - }; - } - namespace context - { - - - - - - - - - - - - - template<typename Expr, typename Context> - struct callable_eval<Expr, Context, 8> - { - typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6; typedef typename proto::result_of::child_c< Expr const &, 7>::type child7; - typedef - typename BOOST_PROTO_RESULT_OF< - Context( - typename Expr::proto_tag - , child0 , child1 , child2 , child3 , child4 , child5 , child6 , child7 - ) - >::type - result_type; - - - - result_type operator ()(Expr &expr, Context &context) const - { - return context( - typename Expr::proto_tag() - , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr) , proto::child_c< 7>( expr) - ); - } - }; - } - namespace detail - { - template<typename Expr, typename Context> - struct is_expr_handled<Expr, Context, 9> - { - static callable_context_wrapper<Context> &sctx_; - static Expr &sexpr_; - static typename Expr::proto_tag &stag_; - static const bool value = - sizeof(yes_type) == - sizeof( - detail::check_is_expr_handled( - (sctx_( - stag_ - , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_) , proto::child_c< 7>( sexpr_) , proto::child_c< 8>( sexpr_) - ), 0) - ) - ); - typedef mpl::bool_<value> type; - }; - } - namespace context - { - - - - - - - - - - - - - template<typename Expr, typename Context> - struct callable_eval<Expr, Context, 9> - { - typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6; typedef typename proto::result_of::child_c< Expr const &, 7>::type child7; typedef typename proto::result_of::child_c< Expr const &, 8>::type child8; - typedef - typename BOOST_PROTO_RESULT_OF< - Context( - typename Expr::proto_tag - , child0 , child1 , child2 , child3 , child4 , child5 , child6 , child7 , child8 - ) - >::type - result_type; - - - - result_type operator ()(Expr &expr, Context &context) const - { - return context( - typename Expr::proto_tag() - , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr) , proto::child_c< 7>( expr) , proto::child_c< 8>( expr) - ); - } - }; - } - namespace detail - { - template<typename Expr, typename Context> - struct is_expr_handled<Expr, Context, 10> - { - static callable_context_wrapper<Context> &sctx_; - static Expr &sexpr_; - static typename Expr::proto_tag &stag_; - static const bool value = - sizeof(yes_type) == - sizeof( - detail::check_is_expr_handled( - (sctx_( - stag_ - , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_) , proto::child_c< 7>( sexpr_) , proto::child_c< 8>( sexpr_) , proto::child_c< 9>( sexpr_) - ), 0) - ) - ); - typedef mpl::bool_<value> type; - }; - } - namespace context - { - - - - - - - - - - - - - template<typename Expr, typename Context> - struct callable_eval<Expr, Context, 10> - { - typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6; typedef typename proto::result_of::child_c< Expr const &, 7>::type child7; typedef typename proto::result_of::child_c< Expr const &, 8>::type child8; typedef typename proto::result_of::child_c< Expr const &, 9>::type child9; - typedef - typename BOOST_PROTO_RESULT_OF< - Context( - typename Expr::proto_tag - , child0 , child1 , child2 , child3 , child4 , child5 , child6 , child7 , child8 , child9 - ) - >::type - result_type; - - - - result_type operator ()(Expr &expr, Context &context) const - { - return context( - typename Expr::proto_tag() - , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr) , proto::child_c< 7>( expr) , proto::child_c< 8>( expr) , proto::child_c< 9>( expr) - ); - } - }; - } diff --git a/contrib/restricted/boost/proto/include/boost/proto/context/detail/preprocessed/default_eval.hpp b/contrib/restricted/boost/proto/include/boost/proto/context/detail/preprocessed/default_eval.hpp deleted file mode 100644 index ebc69ce062..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/context/detail/preprocessed/default_eval.hpp +++ /dev/null @@ -1,279 +0,0 @@ - /////////////////////////////////////////////////////////////////////////////// - /// \file default_eval.hpp - /// Contains specializations of the default_eval\<\> class template. - // - // Copyright 2008 Eric Niebler. 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) - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::function, 3> - { - typedef - typename proto::detail::result_of_fixup< - typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type - >::type - function_type; - typedef - typename BOOST_PROTO_RESULT_OF< - function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type) - >::type - result_type; - result_type operator ()(Expr &expr, Context &context) const - { - return this->invoke(expr, context, is_member_function_pointer<function_type>()); - } - private: - result_type invoke(Expr &expr, Context &context, mpl::false_) const - { - return proto::eval(proto::child_c< 0>( expr), context)( - proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) - ); - } - result_type invoke(Expr &expr, Context &context, mpl::true_) const - { - BOOST_PROTO_USE_GET_POINTER(); - typedef typename detail::class_member_traits<function_type>::class_type class_type; - return ( - BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->* - proto::eval(proto::child_c< 0>( expr), context) - )(proto::eval(proto::child_c< 2>( expr), context)); - } - }; - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::function, 4> - { - typedef - typename proto::detail::result_of_fixup< - typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type - >::type - function_type; - typedef - typename BOOST_PROTO_RESULT_OF< - function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type) - >::type - result_type; - result_type operator ()(Expr &expr, Context &context) const - { - return this->invoke(expr, context, is_member_function_pointer<function_type>()); - } - private: - result_type invoke(Expr &expr, Context &context, mpl::false_) const - { - return proto::eval(proto::child_c< 0>( expr), context)( - proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) - ); - } - result_type invoke(Expr &expr, Context &context, mpl::true_) const - { - BOOST_PROTO_USE_GET_POINTER(); - typedef typename detail::class_member_traits<function_type>::class_type class_type; - return ( - BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->* - proto::eval(proto::child_c< 0>( expr), context) - )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context)); - } - }; - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::function, 5> - { - typedef - typename proto::detail::result_of_fixup< - typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type - >::type - function_type; - typedef - typename BOOST_PROTO_RESULT_OF< - function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type) - >::type - result_type; - result_type operator ()(Expr &expr, Context &context) const - { - return this->invoke(expr, context, is_member_function_pointer<function_type>()); - } - private: - result_type invoke(Expr &expr, Context &context, mpl::false_) const - { - return proto::eval(proto::child_c< 0>( expr), context)( - proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) - ); - } - result_type invoke(Expr &expr, Context &context, mpl::true_) const - { - BOOST_PROTO_USE_GET_POINTER(); - typedef typename detail::class_member_traits<function_type>::class_type class_type; - return ( - BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->* - proto::eval(proto::child_c< 0>( expr), context) - )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context)); - } - }; - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::function, 6> - { - typedef - typename proto::detail::result_of_fixup< - typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type - >::type - function_type; - typedef - typename BOOST_PROTO_RESULT_OF< - function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type) - >::type - result_type; - result_type operator ()(Expr &expr, Context &context) const - { - return this->invoke(expr, context, is_member_function_pointer<function_type>()); - } - private: - result_type invoke(Expr &expr, Context &context, mpl::false_) const - { - return proto::eval(proto::child_c< 0>( expr), context)( - proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) - ); - } - result_type invoke(Expr &expr, Context &context, mpl::true_) const - { - BOOST_PROTO_USE_GET_POINTER(); - typedef typename detail::class_member_traits<function_type>::class_type class_type; - return ( - BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->* - proto::eval(proto::child_c< 0>( expr), context) - )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context)); - } - }; - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::function, 7> - { - typedef - typename proto::detail::result_of_fixup< - typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type - >::type - function_type; - typedef - typename BOOST_PROTO_RESULT_OF< - function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 6>::type >::type , Context >::type) - >::type - result_type; - result_type operator ()(Expr &expr, Context &context) const - { - return this->invoke(expr, context, is_member_function_pointer<function_type>()); - } - private: - result_type invoke(Expr &expr, Context &context, mpl::false_) const - { - return proto::eval(proto::child_c< 0>( expr), context)( - proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) - ); - } - result_type invoke(Expr &expr, Context &context, mpl::true_) const - { - BOOST_PROTO_USE_GET_POINTER(); - typedef typename detail::class_member_traits<function_type>::class_type class_type; - return ( - BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->* - proto::eval(proto::child_c< 0>( expr), context) - )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context)); - } - }; - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::function, 8> - { - typedef - typename proto::detail::result_of_fixup< - typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type - >::type - function_type; - typedef - typename BOOST_PROTO_RESULT_OF< - function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 6>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 7>::type >::type , Context >::type) - >::type - result_type; - result_type operator ()(Expr &expr, Context &context) const - { - return this->invoke(expr, context, is_member_function_pointer<function_type>()); - } - private: - result_type invoke(Expr &expr, Context &context, mpl::false_) const - { - return proto::eval(proto::child_c< 0>( expr), context)( - proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context) - ); - } - result_type invoke(Expr &expr, Context &context, mpl::true_) const - { - BOOST_PROTO_USE_GET_POINTER(); - typedef typename detail::class_member_traits<function_type>::class_type class_type; - return ( - BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->* - proto::eval(proto::child_c< 0>( expr), context) - )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context)); - } - }; - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::function, 9> - { - typedef - typename proto::detail::result_of_fixup< - typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type - >::type - function_type; - typedef - typename BOOST_PROTO_RESULT_OF< - function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 6>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 7>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 8>::type >::type , Context >::type) - >::type - result_type; - result_type operator ()(Expr &expr, Context &context) const - { - return this->invoke(expr, context, is_member_function_pointer<function_type>()); - } - private: - result_type invoke(Expr &expr, Context &context, mpl::false_) const - { - return proto::eval(proto::child_c< 0>( expr), context)( - proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context) , proto::eval(proto::child_c< 8>( expr), context) - ); - } - result_type invoke(Expr &expr, Context &context, mpl::true_) const - { - BOOST_PROTO_USE_GET_POINTER(); - typedef typename detail::class_member_traits<function_type>::class_type class_type; - return ( - BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->* - proto::eval(proto::child_c< 0>( expr), context) - )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context) , proto::eval(proto::child_c< 8>( expr), context)); - } - }; - template<typename Expr, typename Context> - struct default_eval<Expr, Context, proto::tag::function, 10> - { - typedef - typename proto::detail::result_of_fixup< - typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 0>::type >::type , Context >::type - >::type - function_type; - typedef - typename BOOST_PROTO_RESULT_OF< - function_type(typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 1>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 2>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 3>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 4>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 5>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 6>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 7>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 8>::type >::type , Context >::type , typename proto::result_of::eval< typename remove_reference< typename proto::result_of::child_c< Expr, 9>::type >::type , Context >::type) - >::type - result_type; - result_type operator ()(Expr &expr, Context &context) const - { - return this->invoke(expr, context, is_member_function_pointer<function_type>()); - } - private: - result_type invoke(Expr &expr, Context &context, mpl::false_) const - { - return proto::eval(proto::child_c< 0>( expr), context)( - proto::eval(proto::child_c< 1>( expr), context) , proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context) , proto::eval(proto::child_c< 8>( expr), context) , proto::eval(proto::child_c< 9>( expr), context) - ); - } - result_type invoke(Expr &expr, Context &context, mpl::true_) const - { - BOOST_PROTO_USE_GET_POINTER(); - typedef typename detail::class_member_traits<function_type>::class_type class_type; - return ( - BOOST_PROTO_GET_POINTER(class_type, (proto::eval(proto::child_c< 1>( expr), context))) ->* - proto::eval(proto::child_c< 0>( expr), context) - )(proto::eval(proto::child_c< 2>( expr), context) , proto::eval(proto::child_c< 3>( expr), context) , proto::eval(proto::child_c< 4>( expr), context) , proto::eval(proto::child_c< 5>( expr), context) , proto::eval(proto::child_c< 6>( expr), context) , proto::eval(proto::child_c< 7>( expr), context) , proto::eval(proto::child_c< 8>( expr), context) , proto::eval(proto::child_c< 9>( expr), context)); - } - }; diff --git a/contrib/restricted/boost/proto/include/boost/proto/context/detail/preprocessed/null_eval.hpp b/contrib/restricted/boost/proto/include/boost/proto/context/detail/preprocessed/null_eval.hpp deleted file mode 100644 index e124408cfa..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/context/detail/preprocessed/null_eval.hpp +++ /dev/null @@ -1,97 +0,0 @@ - /////////////////////////////////////////////////////////////////////////////// - /// \file null_eval.hpp - /// Contains specializations of the null_eval\<\> class template. - // - // Copyright 2008 Eric Niebler. 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) - template<typename Expr, typename Context> - struct null_eval<Expr, Context, 1> - { - typedef void result_type; - void operator ()(Expr &expr, Context &ctx) const - { - proto::eval(proto::child_c< 0>(expr), ctx); - } - }; - template<typename Expr, typename Context> - struct null_eval<Expr, Context, 2> - { - typedef void result_type; - void operator ()(Expr &expr, Context &ctx) const - { - proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); - } - }; - template<typename Expr, typename Context> - struct null_eval<Expr, Context, 3> - { - typedef void result_type; - void operator ()(Expr &expr, Context &ctx) const - { - proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); - } - }; - template<typename Expr, typename Context> - struct null_eval<Expr, Context, 4> - { - typedef void result_type; - void operator ()(Expr &expr, Context &ctx) const - { - proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); - } - }; - template<typename Expr, typename Context> - struct null_eval<Expr, Context, 5> - { - typedef void result_type; - void operator ()(Expr &expr, Context &ctx) const - { - proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); - } - }; - template<typename Expr, typename Context> - struct null_eval<Expr, Context, 6> - { - typedef void result_type; - void operator ()(Expr &expr, Context &ctx) const - { - proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx); - } - }; - template<typename Expr, typename Context> - struct null_eval<Expr, Context, 7> - { - typedef void result_type; - void operator ()(Expr &expr, Context &ctx) const - { - proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx); proto::eval(proto::child_c< 6>(expr), ctx); - } - }; - template<typename Expr, typename Context> - struct null_eval<Expr, Context, 8> - { - typedef void result_type; - void operator ()(Expr &expr, Context &ctx) const - { - proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx); proto::eval(proto::child_c< 6>(expr), ctx); proto::eval(proto::child_c< 7>(expr), ctx); - } - }; - template<typename Expr, typename Context> - struct null_eval<Expr, Context, 9> - { - typedef void result_type; - void operator ()(Expr &expr, Context &ctx) const - { - proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx); proto::eval(proto::child_c< 6>(expr), ctx); proto::eval(proto::child_c< 7>(expr), ctx); proto::eval(proto::child_c< 8>(expr), ctx); - } - }; - template<typename Expr, typename Context> - struct null_eval<Expr, Context, 10> - { - typedef void result_type; - void operator ()(Expr &expr, Context &ctx) const - { - proto::eval(proto::child_c< 0>(expr), ctx); proto::eval(proto::child_c< 1>(expr), ctx); proto::eval(proto::child_c< 2>(expr), ctx); proto::eval(proto::child_c< 3>(expr), ctx); proto::eval(proto::child_c< 4>(expr), ctx); proto::eval(proto::child_c< 5>(expr), ctx); proto::eval(proto::child_c< 6>(expr), ctx); proto::eval(proto::child_c< 7>(expr), ctx); proto::eval(proto::child_c< 8>(expr), ctx); proto::eval(proto::child_c< 9>(expr), ctx); - } - }; diff --git a/contrib/restricted/boost/proto/include/boost/proto/context/null.hpp b/contrib/restricted/boost/proto/include/boost/proto/context/null.hpp deleted file mode 100644 index 7e0dc5f4cd..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/context/null.hpp +++ /dev/null @@ -1,56 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file null.hpp -/// Definintion of null_context\<\>, an evaluation context for -/// proto::eval() that simply evaluates each child expression, doesn't -/// combine the results at all, and returns void. -// -// Copyright 2008 Eric Niebler. 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) - -#ifndef BOOST_PROTO_CONTEXT_NULL_HPP_EAN_06_24_2007 -#define BOOST_PROTO_CONTEXT_NULL_HPP_EAN_06_24_2007 - -#include <boost/preprocessor/iteration/iterate.hpp> -#include <boost/preprocessor/repetition/repeat.hpp> -#include <boost/proto/proto_fwd.hpp> -#include <boost/proto/eval.hpp> -#include <boost/proto/traits.hpp> - -namespace boost { namespace proto { namespace context -{ - - template< - typename Expr - , typename Context - , long Arity // = Expr::proto_arity_c - > - struct null_eval - {}; - - template<typename Expr, typename Context> - struct null_eval<Expr, Context, 0> - { - typedef void result_type; - void operator()(Expr &, Context &) const - {} - }; - - // Additional specializations generated by the preprocessor - #include <boost/proto/context/detail/null_eval.hpp> - - /// null_context - /// - struct null_context - { - /// null_context::eval - /// - template<typename Expr, typename ThisContext = null_context const> - struct eval - : null_eval<Expr, ThisContext> - {}; - }; - -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/debug.hpp b/contrib/restricted/boost/proto/include/boost/proto/debug.hpp deleted file mode 100644 index 5306a09073..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/debug.hpp +++ /dev/null @@ -1,283 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file debug.hpp -/// Utilities for debugging Proto expression trees -// -// Copyright 2008 Eric Niebler. 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) - -#ifndef BOOST_PROTO_DEBUG_HPP_EAN_12_31_2006 -#define BOOST_PROTO_DEBUG_HPP_EAN_12_31_2006 - -#include <iostream> -#include <boost/preprocessor/stringize.hpp> -#include <boost/core/ref.hpp> -#include <boost/core/typeinfo.hpp> -#include <boost/mpl/assert.hpp> -#include <boost/proto/proto_fwd.hpp> -#include <boost/proto/traits.hpp> -#include <boost/proto/matches.hpp> -#include <boost/proto/fusion.hpp> -#include <boost/fusion/algorithm/iteration/for_each.hpp> - -namespace boost { namespace proto -{ - namespace tagns_ { namespace tag - { - #define BOOST_PROTO_DEFINE_TAG_INSERTION(Tag) \ - /** \brief INTERNAL ONLY */ \ - inline std::ostream &operator <<(std::ostream &sout, Tag const &) \ - { \ - return sout << BOOST_PP_STRINGIZE(Tag); \ - } \ - /**/ - - BOOST_PROTO_DEFINE_TAG_INSERTION(terminal) - BOOST_PROTO_DEFINE_TAG_INSERTION(unary_plus) - BOOST_PROTO_DEFINE_TAG_INSERTION(negate) - BOOST_PROTO_DEFINE_TAG_INSERTION(dereference) - BOOST_PROTO_DEFINE_TAG_INSERTION(complement) - BOOST_PROTO_DEFINE_TAG_INSERTION(address_of) - BOOST_PROTO_DEFINE_TAG_INSERTION(logical_not) - BOOST_PROTO_DEFINE_TAG_INSERTION(pre_inc) - BOOST_PROTO_DEFINE_TAG_INSERTION(pre_dec) - BOOST_PROTO_DEFINE_TAG_INSERTION(post_inc) - BOOST_PROTO_DEFINE_TAG_INSERTION(post_dec) - BOOST_PROTO_DEFINE_TAG_INSERTION(shift_left) - BOOST_PROTO_DEFINE_TAG_INSERTION(shift_right) - BOOST_PROTO_DEFINE_TAG_INSERTION(multiplies) - BOOST_PROTO_DEFINE_TAG_INSERTION(divides) - BOOST_PROTO_DEFINE_TAG_INSERTION(modulus) - BOOST_PROTO_DEFINE_TAG_INSERTION(plus) - BOOST_PROTO_DEFINE_TAG_INSERTION(minus) - BOOST_PROTO_DEFINE_TAG_INSERTION(less) - BOOST_PROTO_DEFINE_TAG_INSERTION(greater) - BOOST_PROTO_DEFINE_TAG_INSERTION(less_equal) - BOOST_PROTO_DEFINE_TAG_INSERTION(greater_equal) - BOOST_PROTO_DEFINE_TAG_INSERTION(equal_to) - BOOST_PROTO_DEFINE_TAG_INSERTION(not_equal_to) - BOOST_PROTO_DEFINE_TAG_INSERTION(logical_or) - BOOST_PROTO_DEFINE_TAG_INSERTION(logical_and) - BOOST_PROTO_DEFINE_TAG_INSERTION(bitwise_and) - BOOST_PROTO_DEFINE_TAG_INSERTION(bitwise_or) - BOOST_PROTO_DEFINE_TAG_INSERTION(bitwise_xor) - BOOST_PROTO_DEFINE_TAG_INSERTION(comma) - BOOST_PROTO_DEFINE_TAG_INSERTION(mem_ptr) - BOOST_PROTO_DEFINE_TAG_INSERTION(assign) - BOOST_PROTO_DEFINE_TAG_INSERTION(shift_left_assign) - BOOST_PROTO_DEFINE_TAG_INSERTION(shift_right_assign) - BOOST_PROTO_DEFINE_TAG_INSERTION(multiplies_assign) - BOOST_PROTO_DEFINE_TAG_INSERTION(divides_assign) - BOOST_PROTO_DEFINE_TAG_INSERTION(modulus_assign) - BOOST_PROTO_DEFINE_TAG_INSERTION(plus_assign) - BOOST_PROTO_DEFINE_TAG_INSERTION(minus_assign) - BOOST_PROTO_DEFINE_TAG_INSERTION(bitwise_and_assign) - BOOST_PROTO_DEFINE_TAG_INSERTION(bitwise_or_assign) - BOOST_PROTO_DEFINE_TAG_INSERTION(bitwise_xor_assign) - BOOST_PROTO_DEFINE_TAG_INSERTION(subscript) - BOOST_PROTO_DEFINE_TAG_INSERTION(member) - BOOST_PROTO_DEFINE_TAG_INSERTION(if_else_) - BOOST_PROTO_DEFINE_TAG_INSERTION(function) - - #undef BOOST_PROTO_DEFINE_TAG_INSERTION - }} - - namespace hidden_detail_ - { - struct ostream_wrapper - { - ostream_wrapper(std::ostream &sout) - : sout_(sout) - {} - - std::ostream &sout_; - - BOOST_DELETED_FUNCTION(ostream_wrapper &operator =(ostream_wrapper const &)) - }; - - struct named_any - { - template<typename T> - named_any(T const &) - : name_(BOOST_CORE_TYPEID(T).name()) - {} - - char const *name_; - }; - - inline std::ostream &operator <<(ostream_wrapper sout_wrap, named_any t) - { - return sout_wrap.sout_ << t.name_; - } - } - - namespace detail - { - // copyable functor to pass by value to fusion::foreach - struct display_expr_impl; - struct display_expr_impl_functor - { - display_expr_impl_functor(display_expr_impl const& impl): impl_(impl) - {} - - template<typename Expr> - void operator()(Expr const &expr) const - { - this->impl_(expr); - } - - private: - display_expr_impl const& impl_; - }; - - struct display_expr_impl - { - explicit display_expr_impl(std::ostream &sout, int depth = 0) - : depth_(depth) - , first_(true) - , sout_(sout) - {} - - template<typename Expr> - void operator()(Expr const &expr) const - { - this->impl(expr, mpl::long_<arity_of<Expr>::value>()); - } - - BOOST_DELETED_FUNCTION(display_expr_impl(display_expr_impl const &)) - BOOST_DELETED_FUNCTION(display_expr_impl &operator =(display_expr_impl const &)) - private: - - template<typename Expr> - void impl(Expr const &expr, mpl::long_<0>) const - { - using namespace hidden_detail_; - typedef typename tag_of<Expr>::type tag; - this->sout_.width(this->depth_); - this->sout_ << (this->first_? "" : ", "); - this->sout_ << tag() << "(" << proto::value(expr) << ")\n"; - this->first_ = false; - } - - template<typename Expr, typename Arity> - void impl(Expr const &expr, Arity) const - { - using namespace hidden_detail_; - typedef typename tag_of<Expr>::type tag; - this->sout_.width(this->depth_); - this->sout_ << (this->first_? "" : ", "); - this->sout_ << tag() << "(\n"; - display_expr_impl display(this->sout_, this->depth_ + 4); - fusion::for_each(expr, display_expr_impl_functor(display)); - this->sout_.width(this->depth_); - this->sout_ << "" << ")\n"; - this->first_ = false; - } - - int depth_; - mutable bool first_; - std::ostream &sout_; - }; - } - - namespace functional - { - /// \brief Pretty-print a Proto expression tree. - /// - /// A PolymorphicFunctionObject which accepts a Proto expression - /// tree and pretty-prints it to an \c ostream for debugging - /// purposes. - struct display_expr - { - BOOST_PROTO_CALLABLE() - - typedef void result_type; - - /// \param sout The \c ostream to which the expression tree - /// will be written. - /// \param depth The starting indentation depth for this node. - /// Children nodes will be displayed at a starting - /// depth of <tt>depth+4</tt>. - explicit display_expr(std::ostream &sout = std::cout, int depth = 0) - : depth_(depth) - , sout_(sout) - {} - - /// \brief Pretty-print the current node in a Proto expression - /// tree. - template<typename Expr> - void operator()(Expr const &expr) const - { - detail::display_expr_impl(this->sout_, this->depth_)(expr); - } - - private: - int depth_; - reference_wrapper<std::ostream> sout_; - }; - } - - /// \brief Pretty-print a Proto expression tree. - /// - /// \note Equivalent to <tt>functional::display_expr(0, sout)(expr)</tt> - /// \param expr The Proto expression tree to pretty-print - /// \param sout The \c ostream to which the output should be - /// written. If not specified, defaults to - /// <tt>std::cout</tt>. - template<typename Expr> - void display_expr(Expr const &expr, std::ostream &sout) - { - functional::display_expr(sout, 0)(expr); - } - - /// \overload - /// - template<typename Expr> - void display_expr(Expr const &expr) - { - functional::display_expr()(expr); - } - - /// \brief Assert at compile time that a particular expression - /// matches the specified grammar. - /// - /// \note Equivalent to <tt>BOOST_MPL_ASSERT((proto::matches\<Expr, Grammar\>))</tt> - /// \param expr The Proto expression to check againts <tt>Grammar</tt> - template<typename Grammar, typename Expr> - void assert_matches(Expr const & /*expr*/) - { - BOOST_MPL_ASSERT((proto::matches<Expr, Grammar>)); - } - - /// \brief Assert at compile time that a particular expression - /// does not match the specified grammar. - /// - /// \note Equivalent to <tt>BOOST_MPL_ASSERT_NOT((proto::matches\<Expr, Grammar\>))</tt> - /// \param expr The Proto expression to check againts <tt>Grammar</tt> - template<typename Grammar, typename Expr> - void assert_matches_not(Expr const & /*expr*/) - { - BOOST_MPL_ASSERT_NOT((proto::matches<Expr, Grammar>)); - } - - /// \brief Assert at compile time that a particular expression - /// matches the specified grammar. - /// - /// \note Equivalent to <tt>proto::assert_matches\<Grammar\>(Expr)</tt> - /// \param Expr The Proto expression to check againts <tt>Grammar</tt> - /// \param Grammar The grammar used to validate Expr. - #define BOOST_PROTO_ASSERT_MATCHES(Expr, Grammar) \ - (true ? (void)0 : boost::proto::assert_matches<Grammar>(Expr)) - - /// \brief Assert at compile time that a particular expression - /// does not match the specified grammar. - /// - /// \note Equivalent to <tt>proto::assert_matches_not\<Grammar\>(Expr)</tt> - /// \param Expr The Proto expression to check againts <tt>Grammar</tt> - /// \param Grammar The grammar used to validate Expr. - #define BOOST_PROTO_ASSERT_MATCHES_NOT(Expr, Grammar) \ - (true ? (void)0 : boost::proto::assert_matches_not<Grammar>(Expr)) - -}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional.hpp deleted file mode 100644 index a8577d730b..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file functional.hpp -/// Proto callables for various things -// -// Copyright 2010 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_HPP_EAN_11_27_2010 -#define BOOST_PROTO_FUNCTIONAL_HPP_EAN_11_27_2010 - -#include <boost/proto/functional/std.hpp> -#include <boost/proto/functional/fusion.hpp> -#include <boost/proto/functional/range.hpp> - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/fusion.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/fusion.hpp deleted file mode 100644 index 8aaf4ea06a..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/fusion.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file fusion.hpp -/// Proto callables for things found in the Fusion library -// -// Copyright 2010 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_HPP_EAN_11_27_2010 -#define BOOST_PROTO_FUNCTIONAL_FUSION_HPP_EAN_11_27_2010 - -#include <boost/proto/functional/fusion/at.hpp> -#include <boost/proto/functional/fusion/pop_back.hpp> -#include <boost/proto/functional/fusion/pop_front.hpp> -#include <boost/proto/functional/fusion/push_back.hpp> -#include <boost/proto/functional/fusion/push_front.hpp> -#include <boost/proto/functional/fusion/reverse.hpp> - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/pop_back.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/pop_back.hpp deleted file mode 100644 index f3ebeb8032..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/pop_back.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file pop_back.hpp -/// Proto callables Fusion pop_back -// -// Copyright 2010 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_POP_BACK_HPP_EAN_11_27_2010 -#define BOOST_PROTO_FUNCTIONAL_FUSION_POP_BACK_HPP_EAN_11_27_2010 - -#include <boost/fusion/include/begin.hpp> -#include <boost/fusion/include/end.hpp> -#include <boost/fusion/include/prior.hpp> -#include <boost/fusion/include/pop_back.hpp> -#include <boost/proto/proto_fwd.hpp> - -namespace boost { namespace proto { namespace functional -{ - /// \brief A PolymorphicFunctionObject type that invokes the - /// \c fusion::pop_back() algorithm on its argument. - /// - /// A PolymorphicFunctionObject type that invokes the - /// \c fusion::pop_back() algorithm on its argument. - struct pop_back - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename Seq> - struct result<This(Seq)> - : result<This(Seq const &)> - {}; - - template<typename This, typename Seq> - struct result<This(Seq &)> - : fusion::result_of::pop_back<Seq> - {}; - - template<typename Seq> - typename fusion::result_of::pop_back<Seq>::type - operator ()(Seq &seq) const - { - // Work around a const-correctness issue in Fusion - typedef typename fusion::result_of::pop_back<Seq>::type result_type; - return result_type(fusion::begin(seq), fusion::prior(fusion::end(seq))); - } - - template<typename Seq> - typename fusion::result_of::pop_back<Seq const>::type - operator ()(Seq const &seq) const - { - return fusion::pop_back(seq); - } - }; -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/pop_front.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/pop_front.hpp deleted file mode 100644 index 9586f4d79f..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/pop_front.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file pop_front.hpp -/// Proto callables Fusion pop_front -// -// Copyright 2010 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_POP_FRONT_HPP_EAN_11_27_2010 -#define BOOST_PROTO_FUNCTIONAL_FUSION_POP_FRONT_HPP_EAN_11_27_2010 - -#include <boost/fusion/include/begin.hpp> -#include <boost/fusion/include/end.hpp> -#include <boost/fusion/include/next.hpp> -#include <boost/fusion/include/pop_front.hpp> -#include <boost/proto/proto_fwd.hpp> - -namespace boost { namespace proto { namespace functional -{ - /// \brief A PolymorphicFunctionObject type that invokes the - /// \c fusion::pop_front() algorithm on its argument. - /// - /// A PolymorphicFunctionObject type that invokes the - /// \c fusion::pop_front() algorithm on its argument. This is - /// useful for defining a CallableTransform like \c pop_front(_) - /// which removes the first child from a Proto expression node. - /// Such a transform might be used as the first argument to the - /// \c proto::fold\<\> transform; that is, fold all but - /// the first child. - struct pop_front - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename Seq> - struct result<This(Seq)> - : result<This(Seq const &)> - {}; - - template<typename This, typename Seq> - struct result<This(Seq &)> - : fusion::result_of::pop_front<Seq> - {}; - - template<typename Seq> - typename fusion::result_of::pop_front<Seq>::type - operator ()(Seq &seq) const - { - // Work around a const-correctness issue in Fusion - typedef typename fusion::result_of::pop_front<Seq>::type result_type; - return result_type(fusion::next(fusion::begin(seq)), fusion::end(seq)); - } - - template<typename Seq> - typename fusion::result_of::pop_front<Seq const>::type - operator ()(Seq const &seq) const - { - return fusion::pop_front(seq); - } - }; -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/push_back.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/push_back.hpp deleted file mode 100644 index 8a427ae250..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/push_back.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file push_back.hpp -/// Proto callables Fusion push_back -// -// Copyright 2010 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_PUSH_BACK_HPP_EAN_11_27_2010 -#define BOOST_PROTO_FUNCTIONAL_FUSION_PUSH_BACK_HPP_EAN_11_27_2010 - -#include <boost/type_traits/add_const.hpp> -#include <boost/type_traits/remove_const.hpp> -#include <boost/type_traits/remove_reference.hpp> -#include <boost/fusion/include/push_back.hpp> -#include <boost/proto/proto_fwd.hpp> - -namespace boost { namespace proto { namespace functional -{ - /// \brief A PolymorphicFunctionObject type that invokes the - /// \c fusion::push_back() algorithm on its argument. - /// - /// A PolymorphicFunctionObject type that invokes the - /// \c fusion::push_back() algorithm on its argument. - struct push_back - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename Seq, typename T> - struct result<This(Seq, T)> - : fusion::result_of::push_back< - typename boost::add_const<typename boost::remove_reference<Seq>::type>::type - , typename boost::remove_const<typename boost::remove_reference<T>::type>::type - > - {}; - - template<typename Seq, typename T> - typename fusion::result_of::push_back<Seq const, T>::type - operator ()(Seq const &seq, T const &t) const - { - return fusion::push_back(seq, t); - } - }; -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/push_front.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/push_front.hpp deleted file mode 100644 index d17f509522..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/push_front.hpp +++ /dev/null @@ -1,49 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file push_front.hpp -/// Proto callables Fusion push_front -// -// Copyright 2010 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_PUSH_FRONT_HPP_EAN_11_27_2010 -#define BOOST_PROTO_FUNCTIONAL_FUSION_PUSH_FRONT_HPP_EAN_11_27_2010 - -#include <boost/type_traits/add_const.hpp> -#include <boost/type_traits/remove_const.hpp> -#include <boost/type_traits/remove_reference.hpp> -#include <boost/fusion/include/push_front.hpp> -#include <boost/proto/proto_fwd.hpp> - -namespace boost { namespace proto { namespace functional -{ - /// \brief A PolymorphicFunctionObject type that invokes the - /// \c fusion::push_front() algorithm on its argument. - /// - /// A PolymorphicFunctionObject type that invokes the - /// \c fusion::push_front() algorithm on its argument. - struct push_front - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename Seq, typename T> - struct result<This(Seq, T)> - : fusion::result_of::push_front< - typename boost::add_const<typename boost::remove_reference<Seq>::type>::type - , typename boost::remove_const<typename boost::remove_reference<T>::type>::type - > - {}; - - template<typename Seq, typename T> - typename fusion::result_of::push_front<Seq const, T>::type - operator ()(Seq const &seq, T const &t) const - { - return fusion::push_front(seq, t); - } - }; -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/reverse.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/reverse.hpp deleted file mode 100644 index 3ed154ba6d..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/fusion/reverse.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file reverse.hpp -/// Proto callables Fusion reverse -// -// Copyright 2010 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_FUSION_REVERSE_HPP_EAN_11_27_2010 -#define BOOST_PROTO_FUNCTIONAL_FUSION_REVERSE_HPP_EAN_11_27_2010 - -#include <boost/fusion/include/reverse.hpp> -#include <boost/proto/proto_fwd.hpp> - -namespace boost { namespace proto { namespace functional -{ - /// \brief A PolymorphicFunctionObject type that invokes the - /// \c fusion::reverse() algorithm on its argument. - /// - /// A PolymorphicFunctionObject type that invokes the - /// \c fusion::reverse() algorithm on its argument. This is - /// useful for defining a CallableTransform like \c reverse(_) - /// which reverses the order of the children of a Proto - /// expression node. - struct reverse - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename Seq> - struct result<This(Seq)> - : result<This(Seq const &)> - {}; - - template<typename This, typename Seq> - struct result<This(Seq &)> - : fusion::result_of::reverse<Seq> - {}; - - template<typename Seq> - typename fusion::result_of::reverse<Seq>::type - operator ()(Seq &seq) const - { - // Work around a const-correctness issue in Fusion - typedef typename fusion::result_of::reverse<Seq>::type result_type; - return result_type(seq); - } - - template<typename Seq> - typename fusion::result_of::reverse<Seq const>::type - operator ()(Seq const &seq) const - { - return fusion::reverse(seq); - } - }; -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/range.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/range.hpp deleted file mode 100644 index e83c853266..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/range.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file range.hpp -/// Proto callables for things found in the boost range library -// -// Copyright 2012 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_RANGE_HPP_EAN_27_08_2012 -#define BOOST_PROTO_FUNCTIONAL_RANGE_HPP_EAN_27_08_2012 - -#include <boost/proto/functional/range/begin.hpp> -#include <boost/proto/functional/range/empty.hpp> -#include <boost/proto/functional/range/end.hpp> -#include <boost/proto/functional/range/rbegin.hpp> -#include <boost/proto/functional/range/rend.hpp> -#include <boost/proto/functional/range/size.hpp> - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/range/begin.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/range/begin.hpp deleted file mode 100644 index c425a4164f..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/range/begin.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file begin.hpp -/// Proto callables for boost::begin() -// -// Copyright 2012 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_RANGE_BEGIN_HPP_EAN_27_08_2012 -#define BOOST_PROTO_FUNCTIONAL_RANGE_BEGIN_HPP_EAN_27_08_2012 - -#include <boost/range/begin.hpp> -#include <boost/proto/proto_fwd.hpp> - -namespace boost { namespace proto { namespace functional -{ - - // A PolymorphicFunctionObject that wraps boost::begin() - struct begin - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename Rng> - struct result<This(Rng)> - : boost::range_iterator<Rng const> - {}; - - template<typename This, typename Rng> - struct result<This(Rng &)> - : boost::range_iterator<Rng> - {}; - - template<typename Rng> - typename boost::range_iterator<Rng>::type operator()(Rng &rng) const - { - return boost::begin(rng); - } - - template<typename Rng> - typename boost::range_iterator<Rng const>::type operator()(Rng const &rng) const - { - return boost::begin(rng); - } - }; - -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/range/empty.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/range/empty.hpp deleted file mode 100644 index debb82dcac..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/range/empty.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file empty.hpp -/// Proto callables for boost::empty() -// -// Copyright 2012 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_RANGE_EMPTY_HPP_EAN_27_08_2012 -#define BOOST_PROTO_FUNCTIONAL_RANGE_EMPTY_HPP_EAN_27_08_2012 - -#include <boost/range/empty.hpp> -#include <boost/proto/proto_fwd.hpp> - -namespace boost { namespace proto { namespace functional -{ - - // A PolymorphicFunctionObject that wraps boost::empty() - struct empty - { - BOOST_PROTO_CALLABLE() - - typedef bool result_type; - - template<typename Rng> - bool operator()(Rng const &rng) const - { - return boost::empty(rng); - } - }; - -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/range/end.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/range/end.hpp deleted file mode 100644 index f7506fd89f..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/range/end.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file end.hpp -/// Proto callables for boost::end() -// -// Copyright 2012 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_RANGE_END_HPP_EAN_27_08_2012 -#define BOOST_PROTO_FUNCTIONAL_RANGE_END_HPP_EAN_27_08_2012 - -#include <boost/range/end.hpp> -#include <boost/proto/proto_fwd.hpp> - -namespace boost { namespace proto { namespace functional -{ - - // A PolymorphicFunctionObject that wraps boost::end() - struct end - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename Rng> - struct result<This(Rng)> - : boost::range_iterator<Rng const> - {}; - - template<typename This, typename Rng> - struct result<This(Rng &)> - : boost::range_iterator<Rng> - {}; - - template<typename Rng> - typename boost::range_iterator<Rng>::type operator()(Rng &rng) const - { - return boost::end(rng); - } - - template<typename Rng> - typename boost::range_iterator<Rng const>::type operator()(Rng const &rng) const - { - return boost::end(rng); - } - }; - -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/range/rbegin.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/range/rbegin.hpp deleted file mode 100644 index ecb7db94ea..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/range/rbegin.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file rbegin.hpp -/// Proto callables for boost::rbegin() -// -// Copyright 2012 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_RANGE_RBEGIN_HPP_EAN_27_08_2012 -#define BOOST_PROTO_FUNCTIONAL_RANGE_RBEGIN_HPP_EAN_27_08_2012 - -#include <boost/range/rbegin.hpp> -#include <boost/proto/proto_fwd.hpp> - -namespace boost { namespace proto { namespace functional -{ - - // A PolymorphicFunctionObject that wraps boost::rbegin() - struct rbegin - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename Rng> - struct result<This(Rng)> - : boost::range_reverse_iterator<Rng const> - {}; - - template<typename This, typename Rng> - struct result<This(Rng &)> - : boost::range_reverse_iterator<Rng> - {}; - - template<typename Rng> - typename boost::range_reverse_iterator<Rng>::type operator()(Rng &rng) const - { - return boost::rbegin(rng); - } - - template<typename Rng> - typename boost::range_reverse_iterator<Rng const>::type operator()(Rng const &rng) const - { - return boost::rbegin(rng); - } - }; - -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/range/rend.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/range/rend.hpp deleted file mode 100644 index 5b3778209d..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/range/rend.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file rend.hpp -/// Proto callables for boost::rend() -// -// Copyright 2012 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_RANGE_REND_HPP_EAN_27_08_2012 -#define BOOST_PROTO_FUNCTIONAL_RANGE_REND_HPP_EAN_27_08_2012 - -#include <boost/range/rend.hpp> -#include <boost/proto/proto_fwd.hpp> - -namespace boost { namespace proto { namespace functional -{ - - // A PolymorphicFunctionObject that wraps boost::rend() - struct rend - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename Rng> - struct result<This(Rng)> - : boost::range_reverse_iterator<Rng const> - {}; - - template<typename This, typename Rng> - struct result<This(Rng &)> - : boost::range_reverse_iterator<Rng> - {}; - - template<typename Rng> - typename boost::range_reverse_iterator<Rng>::type operator()(Rng &rng) const - { - return boost::rend(rng); - } - - template<typename Rng> - typename boost::range_reverse_iterator<Rng const>::type operator()(Rng const &rng) const - { - return boost::rend(rng); - } - }; - -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/range/size.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/range/size.hpp deleted file mode 100644 index 3fcdda1159..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/range/size.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file size.hpp -/// Proto callables for boost::size() -// -// Copyright 2012 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_RANGE_SIZE_HPP_EAN_27_08_2012 -#define BOOST_PROTO_FUNCTIONAL_RANGE_SIZE_HPP_EAN_27_08_2012 - -#include <boost/range/size.hpp> -#include <boost/proto/proto_fwd.hpp> - -namespace boost { namespace proto { namespace functional -{ - - // A PolymorphicFunctionObject that wraps boost::size() - struct size - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename Rng> - struct result<This(Rng)> - : boost::range_size<Rng> - {}; - - template<typename This, typename Rng> - struct result<This(Rng &)> - : boost::range_size<Rng> - {}; - - template<typename Rng> - typename boost::range_size<Rng>::type operator()(Rng const &rng) const - { - return boost::size(rng); - } - }; - -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/std.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/std.hpp deleted file mode 100644 index 38758601c2..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/std.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file std.hpp -/// Proto callables for things found in the std library -// -// Copyright 2010 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_STD_HPP_EAN_11_27_2010 -#define BOOST_PROTO_FUNCTIONAL_STD_HPP_EAN_11_27_2010 - -#include <boost/proto/functional/std/utility.hpp> -#include <boost/proto/functional/std/iterator.hpp> - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/std/iterator.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/std/iterator.hpp deleted file mode 100644 index 3ee2c25011..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/std/iterator.hpp +++ /dev/null @@ -1,158 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file iterator.hpp -/// Proto callables for std functions found in \<iterator\> -// -// Copyright 2012 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_STD_ITERATOR_HPP_EAN_27_08_2012 -#define BOOST_PROTO_FUNCTIONAL_STD_ITERATOR_HPP_EAN_27_08_2012 - -#include <iterator> -#include <boost/type_traits/remove_const.hpp> -#include <boost/type_traits/remove_reference.hpp> -#include <boost/proto/proto_fwd.hpp> - -namespace boost { namespace proto { namespace functional -{ - - // A PolymorphicFunctionObject wrapping std::advance - struct advance - { - BOOST_PROTO_CALLABLE() - - typedef void result_type; - - template<typename InputIterator, typename Distance> - void operator()(InputIterator &x, Distance n) const - { - std::advance(x, n); - } - }; - - // A PolymorphicFunctionObject wrapping std::distance - struct distance - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename InputIter1, typename InputIter2> - struct result<This(InputIter1, InputIter2)> - { - typedef - typename std::iterator_traits< - typename boost::remove_const< - typename boost::remove_reference<InputIter1>::type - >::type - >::difference_type - type; - }; - - template<typename InputIterator> - typename std::iterator_traits<InputIterator>::difference_type - operator()(InputIterator first, InputIterator last) const - { - return std::distance(first, last); - } - }; - - // A PolymorphicFunctionObject wrapping std::next - struct next - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename ForwardIterator> - struct result<This(ForwardIterator)> - { - typedef - typename boost::remove_const< - typename boost::remove_reference<ForwardIterator>::type - >::type - type; - }; - - template<typename This, typename ForwardIterator, typename Distance> - struct result<This(ForwardIterator, Distance)> - { - typedef - typename boost::remove_const< - typename boost::remove_reference<ForwardIterator>::type - >::type - type; - }; - - template<typename ForwardIterator> - ForwardIterator operator()(ForwardIterator x) const - { - return std::advance( - x - , static_cast<typename std::iterator_traits<ForwardIterator>::difference_type>(1) - ); - } - - template<typename ForwardIterator> - ForwardIterator operator()( - ForwardIterator x - , typename std::iterator_traits<ForwardIterator>::difference_type n - ) const - { - return std::advance(x, n); - } - }; - - // A PolymorphicFunctionObject wrapping std::prior - struct prior - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename BidirectionalIterator> - struct result<This(BidirectionalIterator)> - { - typedef - typename boost::remove_const< - typename boost::remove_reference<BidirectionalIterator>::type - >::type - type; - }; - - template<typename This, typename BidirectionalIterator, typename Distance> - struct result<This(BidirectionalIterator, Distance)> - { - typedef - typename boost::remove_const< - typename boost::remove_reference<BidirectionalIterator>::type - >::type - type; - }; - - template<typename BidirectionalIterator> - BidirectionalIterator operator()(BidirectionalIterator x) const - { - return std::advance( - x - , -static_cast<typename std::iterator_traits<BidirectionalIterator>::difference_type>(1) - ); - } - - template<typename BidirectionalIterator> - BidirectionalIterator operator()( - BidirectionalIterator x - , typename std::iterator_traits<BidirectionalIterator>::difference_type n - ) const - { - return std::advance(x, -n); - } - }; - -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/functional/std/utility.hpp b/contrib/restricted/boost/proto/include/boost/proto/functional/std/utility.hpp deleted file mode 100644 index c1270d3c89..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/functional/std/utility.hpp +++ /dev/null @@ -1,137 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file utility.hpp -/// Proto callables for things found in the std \<utility\> header -// -// Copyright 2010 Eric Niebler. 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) - -#ifndef BOOST_PROTO_FUNCTIONAL_STD_UTILITY_HPP_EAN_11_27_2010 -#define BOOST_PROTO_FUNCTIONAL_STD_UTILITY_HPP_EAN_11_27_2010 - -#include <utility> -#include <boost/type_traits/remove_const.hpp> -#include <boost/type_traits/remove_reference.hpp> -#include <boost/proto/proto_fwd.hpp> - -namespace boost { namespace proto { namespace functional -{ - /// \brief A PolymorphicFunctionObject type that invokes the - /// \c std::make_pair() algorithm on its arguments. - /// - /// A PolymorphicFunctionObject type that invokes the - /// \c std::make_pair() algorithm on its arguments. - struct make_pair - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename First, typename Second> - struct result<This(First, Second)> - { - typedef - std::pair< - typename remove_const<typename remove_reference<First>::type>::type - , typename remove_const<typename remove_reference<Second>::type>::type - > - type; - }; - - template<typename First, typename Second> - std::pair<First, Second> operator()(First const &first, Second const &second) const - { - return std::make_pair(first, second); - } - }; - - /// \brief A PolymorphicFunctionObject type that returns - /// the first element of a std::pair. - /// - /// A PolymorphicFunctionObject type that returns - /// the first element of a std::pair.. - struct first - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename Pair> - struct result<This(Pair)> - { - typedef typename Pair::first_type type; - }; - - template<typename This, typename Pair> - struct result<This(Pair &)> - { - typedef typename Pair::first_type &type; - }; - - template<typename This, typename Pair> - struct result<This(Pair const &)> - { - typedef typename Pair::first_type const &type; - }; - - template<typename Pair> - typename Pair::first_type &operator()(Pair &pair) const - { - return pair.first; - } - - template<typename Pair> - typename Pair::first_type const &operator()(Pair const &pair) const - { - return pair.first; - } - }; - - /// \brief A PolymorphicFunctionObject type that returns - /// the second element of a std::pair. - /// - /// A PolymorphicFunctionObject type that returns - /// the second element of a std::pair.. - struct second - { - BOOST_PROTO_CALLABLE() - - template<typename Sig> - struct result; - - template<typename This, typename Pair> - struct result<This(Pair)> - { - typedef typename Pair::second_type type; - }; - - template<typename This, typename Pair> - struct result<This(Pair &)> - { - typedef typename Pair::second_type &type; - }; - - template<typename This, typename Pair> - struct result<This(Pair const &)> - { - typedef typename Pair::second_type const &type; - }; - - template<typename Pair> - typename Pair::second_type &operator()(Pair &pair) const - { - return pair.second; - } - - template<typename Pair> - typename Pair::second_type const &operator()(Pair const &pair) const - { - return pair.second; - } - }; - -}}} - -#endif diff --git a/contrib/restricted/boost/proto/include/boost/proto/proto.hpp b/contrib/restricted/boost/proto/include/boost/proto/proto.hpp deleted file mode 100644 index ad2f1bb52a..0000000000 --- a/contrib/restricted/boost/proto/include/boost/proto/proto.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -/// \file proto.hpp -/// Includes all of Proto. -// -// Copyright 2008 Eric Niebler. 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) - -#ifndef BOOST_PROTO_HPP_EAN_04_01_2005 -#define BOOST_PROTO_HPP_EAN_04_01_2005 - -#include <boost/proto/core.hpp> -#include <boost/proto/debug.hpp> -#include <boost/proto/context.hpp> -#include <boost/proto/transform.hpp> -#include <boost/proto/functional.hpp> - -#endif diff --git a/contrib/restricted/boost/range/include/boost/range.hpp b/contrib/restricted/boost/range/include/boost/range.hpp deleted file mode 100644 index 179ae22492..0000000000 --- a/contrib/restricted/boost/range/include/boost/range.hpp +++ /dev/null @@ -1,23 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_HPP_27_07_04 -#define BOOST_RANGE_HPP_27_07_04 - -#if defined(_MSC_VER) -# pragma once -#endif - -#include <boost/range/functions.hpp> -#include <boost/range/metafunctions.hpp> -#include <boost/range/iterator_range.hpp> -#include <boost/range/sub_range.hpp> - -#endif diff --git a/contrib/restricted/boost/range/include/boost/range/category.hpp b/contrib/restricted/boost/range/include/boost/range/category.hpp deleted file mode 100644 index f5431adf2e..0000000000 --- a/contrib/restricted/boost/range/include/boost/range/category.hpp +++ /dev/null @@ -1,29 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2006. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_CATEGORY_HPP -#define BOOST_RANGE_CATEGORY_HPP - -#if defined(_MSC_VER) -# pragma once -#endif - -#include <boost/range/config.hpp> -#include <boost/range/iterator.hpp> -#include <boost/iterator/iterator_traits.hpp> - -namespace boost -{ - template< class T > - struct range_category : iterator_category< typename range_iterator<T>::type > - { }; -} - -#endif diff --git a/contrib/restricted/boost/range/include/boost/range/metafunctions.hpp b/contrib/restricted/boost/range/include/boost/range/metafunctions.hpp deleted file mode 100644 index 7ca2f93e38..0000000000 --- a/contrib/restricted/boost/range/include/boost/range/metafunctions.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_METAFUNCTIONS_HPP -#define BOOST_RANGE_METAFUNCTIONS_HPP - -#if defined(_MSC_VER) -# pragma once -#endif - -#include <boost/range/iterator.hpp> -#include <boost/range/has_range_iterator.hpp> -#include <boost/range/reverse_iterator.hpp> -#include <boost/range/value_type.hpp> -#include <boost/range/size_type.hpp> -#include <boost/range/difference_type.hpp> -#include <boost/range/category.hpp> -#include <boost/range/reference.hpp> -#include <boost/range/pointer.hpp> - -#endif diff --git a/contrib/restricted/boost/range/include/boost/range/pointer.hpp b/contrib/restricted/boost/range/include/boost/range/pointer.hpp deleted file mode 100644 index b1e8dc5c5e..0000000000 --- a/contrib/restricted/boost/range/include/boost/range/pointer.hpp +++ /dev/null @@ -1,30 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2006. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_POINTER_TYPE_HPP -#define BOOST_RANGE_POINTER_TYPE_HPP - -#if defined(_MSC_VER) -# pragma once -#endif - -#include <boost/range/config.hpp> -#include <boost/range/iterator.hpp> -#include <boost/iterator/iterator_traits.hpp> - -namespace boost -{ - template< class T > - struct range_pointer - : iterator_pointer< BOOST_DEDUCED_TYPENAME range_iterator<T>::type > - { }; -} - -#endif diff --git a/contrib/restricted/boost/range/include/boost/range/sub_range.hpp b/contrib/restricted/boost/range/include/boost/range/sub_range.hpp deleted file mode 100644 index 97a9f0fcf5..0000000000 --- a/contrib/restricted/boost/range/include/boost/range/sub_range.hpp +++ /dev/null @@ -1,289 +0,0 @@ -// Boost.Range library -// -// Copyright Neil Groves 2009. -// Copyright Thorsten Ottosen 2003-2004. 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) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_SUB_RANGE_HPP -#define BOOST_RANGE_SUB_RANGE_HPP - -#include <boost/detail/workaround.hpp> - -#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) - #pragma warning( push ) - #pragma warning( disable : 4996 ) -#endif - -#include <boost/range/config.hpp> -#include <boost/range/iterator_range.hpp> -#include <boost/range/value_type.hpp> -#include <boost/range/size_type.hpp> -#include <boost/range/difference_type.hpp> -#include <boost/range/reference.hpp> -#include <boost/range/algorithm/equal.hpp> -#include <boost/assert.hpp> -#include <boost/type_traits/is_reference.hpp> -#include <boost/type_traits/remove_reference.hpp> - -namespace boost -{ - namespace range_detail - { - -template<class ForwardRange, class TraversalTag> -class sub_range_base - : public iterator_range< - BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type - > -{ - typedef iterator_range< - BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type - > base; - -protected: - typedef BOOST_DEDUCED_TYPENAME base::iterator_range_ iterator_range_; - -public: - typedef BOOST_DEDUCED_TYPENAME range_value<ForwardRange>::type value_type; - typedef BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type iterator; - typedef BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange>::type const_iterator; - typedef BOOST_DEDUCED_TYPENAME range_difference<ForwardRange>::type difference_type; - typedef BOOST_DEDUCED_TYPENAME range_size<ForwardRange>::type size_type; - typedef BOOST_DEDUCED_TYPENAME range_reference<ForwardRange>::type reference; - typedef BOOST_DEDUCED_TYPENAME range_reference<const ForwardRange>::type const_reference; - - sub_range_base() - { - } - - template<class Iterator> - sub_range_base(Iterator first, Iterator last) - : base(first, last) - { - } - - reference front() - { - return base::front(); - } - - const_reference front() const - { - return base::front(); - } -}; - -template<class ForwardRange> -class sub_range_base<ForwardRange, bidirectional_traversal_tag> - : public sub_range_base<ForwardRange, forward_traversal_tag> -{ - typedef sub_range_base<ForwardRange, forward_traversal_tag> base; -public: - sub_range_base() - { - } - - template<class Iterator> - sub_range_base(Iterator first, Iterator last) - : base(first, last) - { - } - - BOOST_DEDUCED_TYPENAME base::reference back() - { - return base::back(); - } - - BOOST_DEDUCED_TYPENAME base::const_reference back() const - { - return base::back(); - } -}; - -template<class ForwardRange> -class sub_range_base<ForwardRange, random_access_traversal_tag> - : public sub_range_base<ForwardRange, bidirectional_traversal_tag> -{ - typedef sub_range_base<ForwardRange, bidirectional_traversal_tag> base; - -public: - sub_range_base() - { - } - - template<class Iterator> - sub_range_base(Iterator first, Iterator last) - : base(first, last) - { - } - - BOOST_DEDUCED_TYPENAME base::reference - operator[](BOOST_DEDUCED_TYPENAME base::difference_type n) - { - return this->begin()[n]; - } - - BOOST_DEDUCED_TYPENAME base::const_reference - operator[](BOOST_DEDUCED_TYPENAME base::difference_type n) const - { - return this->begin()[n]; - } -}; - - } // namespace range_detail - - template<class ForwardRange> - class sub_range - : public range_detail::sub_range_base< - ForwardRange, - BOOST_DEDUCED_TYPENAME iterator_traversal< - BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type - >::type - > - { - typedef BOOST_DEDUCED_TYPENAME range_iterator< - ForwardRange - >::type iterator_t; - - typedef range_detail::sub_range_base< - ForwardRange, - BOOST_DEDUCED_TYPENAME iterator_traversal< - BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange>::type - >::type - > base; - - typedef BOOST_DEDUCED_TYPENAME base::impl impl; - - protected: - typedef BOOST_DEDUCED_TYPENAME base::iterator_range_ iterator_range_; - - private: - template<class Source> - struct is_compatible_range - : is_convertible< - BOOST_DEDUCED_TYPENAME mpl::eval_if< - has_range_iterator<Source>, - range_iterator<Source>, - mpl::identity<void> - >::type, - BOOST_DEDUCED_TYPENAME base::iterator - > - { - }; - - public: - sub_range() - { } - -#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500) ) - sub_range(const sub_range& r) - : base(impl::adl_begin(const_cast<base&>(static_cast<const base&>(r))), - impl::adl_end(const_cast<base&>(static_cast<const base&>(r)))) - { } -#else - sub_range(const sub_range& r) = default; -#endif - - template< class ForwardRange2 > - sub_range( - ForwardRange2& r, - BOOST_DEDUCED_TYPENAME ::boost::enable_if< - is_compatible_range<ForwardRange2> - >::type* = 0 - ) - : base(impl::adl_begin(r), impl::adl_end(r)) - { - } - - template< class ForwardRange2 > - sub_range( - const ForwardRange2& r, - BOOST_DEDUCED_TYPENAME ::boost::enable_if< - is_compatible_range<const ForwardRange2> - >::type* = 0 - ) - : base(impl::adl_begin(r), impl::adl_end(r)) - { - } - - BOOST_DEDUCED_TYPENAME base::const_iterator begin() const - { - return base::begin(); - } - - BOOST_DEDUCED_TYPENAME base::iterator begin() - { - return base::begin(); - } - - BOOST_DEDUCED_TYPENAME base::const_iterator end() const - { - return base::end(); - } - - BOOST_DEDUCED_TYPENAME base::iterator end() - { - return base::end(); - } - - template< class Iter > - sub_range( Iter first, Iter last ) : - base( first, last ) - { } - - template<class ForwardRange2> - BOOST_DEDUCED_TYPENAME ::boost::enable_if< - is_compatible_range<ForwardRange2>, - sub_range& - >::type - operator=(ForwardRange2& r) - { - iterator_range_::operator=( r ); - return *this; - } - - template<class ForwardRange2> - BOOST_DEDUCED_TYPENAME ::boost::enable_if< - is_compatible_range<const ForwardRange2>, - sub_range& - >::type - operator=( const ForwardRange2& r ) - { - iterator_range_::operator=( r ); - return *this; - } - - sub_range& operator=( const sub_range& r ) - { - iterator_range_::operator=( static_cast<const iterator_range_&>(r) ); - return *this; - } - - sub_range& advance_begin( - BOOST_DEDUCED_TYPENAME base::difference_type n) - { - std::advance(this->m_Begin, n); - return *this; - } - - sub_range& advance_end( - BOOST_DEDUCED_TYPENAME base::difference_type n) - { - std::advance(this->m_End, n); - return *this; - } - }; - -} // namespace 'boost' - -#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) - #pragma warning( pop ) -#endif - -#endif - diff --git a/contrib/restricted/boost/spirit/README.md b/contrib/restricted/boost/spirit/README.md index 7ec79237d8..3177875645 100644 --- a/contrib/restricted/boost/spirit/README.md +++ b/contrib/restricted/boost/spirit/README.md @@ -14,7 +14,14 @@ executable. The newest Spirit shines faster compile times. Currently only a parser framework. -Requires C++14 compiler (GCC 5, Clang 3.5, VS 2015 Update 3). +*WARNING*: C++14 compilers support will be dropped soon. + +Spirit X3 in Boost 1.81 (scheduled to November 2022) will use C++17 features. + +Supported compilers will be: +* Clang 4 (currently 3.6) +* GCC 7 (currently 5) +* VS 2017 v15.8 (currently 2015 U3) ### Spirit V2 (2nd generation) diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/actor.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/actor.hpp index 706099414d..b6edad46ba 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/actor.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/actor.hpp @@ -26,7 +26,7 @@ // for phrase parsers. Actors should implement at least one of the two () // operator. // -// Actor instances are not created direcly since they usually involve a +// Actor instances are not created directly since they usually involve a // number of template parameters. Instead generator functions ("helper // functions") are provided to generate actors according to their arguments. // All helper functions have the "_a" suffix. For example, append_actor is diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/actor/assign_actor.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/actor/assign_actor.hpp index 94551308d8..975bf7de5f 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/actor/assign_actor.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/actor/assign_actor.hpp @@ -18,7 +18,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN /////////////////////////////////////////////////////////////////////////// // Summary: - // A semantic action policy that applies the assignement operator. + // A semantic action policy that applies the assignment operator. // (This doc uses convention available in actors.hpp) // // Actions (what it does): diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/attribute/closure.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/attribute/closure.hpp index 681bc7fb04..836958a392 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/attribute/closure.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/attribute/closure.hpp @@ -81,7 +81,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN template <typename ResultT, typename ParserT, typename ScannerT> ResultT& post_parse(ResultT& hit, ParserT const&, ScannerT const&) - { hit.value(frame[::phoenix::tuple_index<0>()]); return hit; } + { hit.value(frame[::phoenix::tuple_index_names::_1]); return hit; } private: @@ -121,7 +121,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN template <typename ResultT, typename ParserT, typename ScannerT> ResultT& post_parse(ResultT& hit, ParserT const&, ScannerT const&) - { hit.value(frame[::phoenix::tuple_index<0>()]); return hit; } + { hit.value(frame[::phoenix::tuple_index_names::_1]); return hit; } private: diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/assert.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/assert.hpp index 47b1b39909..809ab1ab25 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/assert.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/assert.hpp @@ -9,9 +9,6 @@ #if !defined(BOOST_SPIRIT_ASSERT_HPP) #define BOOST_SPIRIT_ASSERT_HPP -#include <boost/config.hpp> -#include <boost/throw_exception.hpp> - /////////////////////////////////////////////////////////////////////////////// // // BOOST_SPIRIT_ASSERT is used throughout the framework. It can be @@ -24,10 +21,11 @@ #if defined(NDEBUG) #define BOOST_SPIRIT_ASSERT(x) #elif defined (BOOST_SPIRIT_ASSERT_EXCEPTION) + #include <boost/throw_exception.hpp> #define BOOST_SPIRIT_ASSERT_AUX(f, l, x) BOOST_SPIRIT_ASSERT_AUX2(f, l, x) #define BOOST_SPIRIT_ASSERT_AUX2(f, l, x) \ - do{ if (!(x)) boost::throw_exception( \ - BOOST_SPIRIT_ASSERT_EXCEPTION(f "(" #l "): " #x)); } while(0) + ( (x) ? (void)0 : boost::throw_exception( \ + BOOST_SPIRIT_ASSERT_EXCEPTION(f "(" #l "): " #x)) ) #define BOOST_SPIRIT_ASSERT(x) BOOST_SPIRIT_ASSERT_AUX(__FILE__, __LINE__, x) #else #include <boost/assert.hpp> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/composite/epsilon.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/composite/epsilon.hpp index 1bea0e2968..71f20a0c08 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/composite/epsilon.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/composite/epsilon.hpp @@ -30,7 +30,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN // // condition_parser class // -// handles expresions of the form +// handles expressions of the form // // epsilon_p(cond) // @@ -93,7 +93,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN // // handles expressions of the form // epsilon_p(subject) -// where subject is a parser. The expresion returns a composite +// where subject is a parser. The expression returns a composite // parser that returns an empty match if the subject parser matches. // /////////////////////////////////////////////////////////////////////////////// diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/config.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/config.hpp index 57eca7f037..7b24ee654f 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/config.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/config.hpp @@ -49,7 +49,7 @@ // ///////////////////////////////////////////////////////////////////////////////// #if (defined(BOOST_MSVC) && (BOOST_MSVC < 1310)) \ - || (defined(__BORLANDC__) && (__BORLANDC__ <= 0x570)) \ + || (defined(BOOST_BORLANDC) && (BOOST_BORLANDC <= 0x570)) \ || (defined(__GNUC__) && (__GNUC__ < 3)) \ || (defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ < 1)) # error "Compiler not supported. See note in <boost/spirit/core/config.hpp>" diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/match.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/match.hpp index c82baa1489..c7f6da2b6b 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/match.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/match.hpp @@ -34,7 +34,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN // length of the match is the number of characters (or tokens) that // is successfully matched. This can be queried through its length() // member function. A negative value means that the match is - // unsucessful. + // unsuccessful. // // Each parser may have an associated attribute. This attribute is // also returned back to the client on a successful parse through diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp index 116c6e31ce..371ea32ea0 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp @@ -170,7 +170,7 @@ struct grammar_definition } int - undefine(grammar_t* target_grammar) + undefine(grammar_t* target_grammar) BOOST_OVERRIDE { typename grammar_t::object_id id = target_grammar->get_object_id(); diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp index c39d359cbd..fc56566377 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp @@ -102,7 +102,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN #ifdef BOOST_SPIRIT_THREADSAFE boost::unique_lock<boost::mutex> lock(mutex); #endif - if (free_ids.size()) + if (!free_ids.empty()) { object_id id = *free_ids.rbegin(); free_ids.pop_back(); diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp index 137694ef2f..87eb717dbe 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp @@ -114,8 +114,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN class rule_base_access { -#if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) \ - || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) +#if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) public: // YUCK! #else template < @@ -233,16 +232,16 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN struct concrete_parser : abstract_parser<ScannerT, AttrT> { concrete_parser(ParserT const& p_) : p(p_) {} - virtual ~concrete_parser() {} + ~concrete_parser() BOOST_OVERRIDE {} - virtual typename match_result<ScannerT, AttrT>::type - do_parse_virtual(ScannerT const& scan) const + typename match_result<ScannerT, AttrT>::type + do_parse_virtual(ScannerT const& scan) const BOOST_OVERRIDE { return p.parse(scan); } - virtual abstract_parser<ScannerT, AttrT>* - clone() const + abstract_parser<ScannerT, AttrT>* + clone() const BOOST_OVERRIDE { return new concrete_parser(p); } diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/primitives/primitives.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/primitives/primitives.hpp index 93b5b22eb2..4cbdd488cb 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/primitives/primitives.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/primitives/primitives.hpp @@ -49,6 +49,12 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN { typedef typename ScannerT::value_t value_t; typedef typename ScannerT::iterator_t iterator_t; + typedef scanner_policies< + no_skipper_iteration_policy< + BOOST_DEDUCED_TYPENAME ScannerT::iteration_policy_t>, + BOOST_DEDUCED_TYPENAME ScannerT::match_policy_t, + BOOST_DEDUCED_TYPENAME ScannerT::action_policy_t + > policies_t; if (!scan.at_end()) { @@ -56,7 +62,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN if (this->derived().test(ch)) { iterator_t save(scan.first); - ++scan; + ++scan.change_policies(policies_t(scan)); return scan.create_match(1, ch, save, scan.first); } } @@ -584,19 +590,26 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN typename parser_result<self_t, ScannerT>::type parse(ScannerT const& scan) const { + typedef scanner_policies< + no_skipper_iteration_policy< + BOOST_DEDUCED_TYPENAME ScannerT::iteration_policy_t>, + BOOST_DEDUCED_TYPENAME ScannerT::match_policy_t, + BOOST_DEDUCED_TYPENAME ScannerT::action_policy_t + > policies_t; + typename ScannerT::iterator_t save = scan.first; std::size_t len = 0; if (!scan.at_end() && *scan == '\r') // CR { - ++scan; + ++scan.change_policies(policies_t(scan)); ++len; } // Don't call skipper here if (scan.first != scan.last && *scan == '\n') // LF { - ++scan; + ++scan.change_policies(policies_t(scan)); ++len; } diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/scanner/scanner.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/scanner/scanner.hpp index 38548770eb..48938dbeed 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/scanner/scanner.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/core/scanner/scanner.hpp @@ -13,7 +13,6 @@ #include <boost/spirit/home/classic/namespace.hpp> #include <boost/spirit/home/classic/core/match.hpp> #include <boost/spirit/home/classic/core/non_terminal/parser_id.hpp> -#include <boost/detail/iterator.hpp> // for boost::detail::iterator_traits #include <boost/spirit/home/classic/core/scanner/scanner_fwd.hpp> @@ -219,9 +218,9 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN typedef IteratorT iterator_t; typedef PoliciesT policies_t; - typedef typename boost::detail:: + typedef typename std:: iterator_traits<IteratorT>::value_type value_t; - typedef typename boost::detail:: + typedef typename std:: iterator_traits<IteratorT>::reference ref_t; typedef typename boost:: call_traits<IteratorT>::param_type iter_param_t; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/debug/impl/parser_names.ipp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/debug/impl/parser_names.ipp index 1701088aa2..85cecae5b1 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/debug/impl/parser_names.ipp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/debug/impl/parser_names.ipp @@ -95,7 +95,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN // from numerics.hpp template <typename T, int Radix, unsigned MinDigits, int MaxDigits> inline std::string - parser_name(uint_parser<T, Radix, MinDigits, MaxDigits> const& p) + parser_name(uint_parser<T, Radix, MinDigits, MaxDigits> const& /*p*/) { BOOST_SPIRIT_SSTREAM stream; stream << Radix << ", " << MinDigits << ", " << MaxDigits; @@ -106,7 +106,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN template <typename T, int Radix, unsigned MinDigits, int MaxDigits> inline std::string - parser_name(int_parser<T, Radix, MinDigits, MaxDigits> const& p) + parser_name(int_parser<T, Radix, MinDigits, MaxDigits> const& /*p*/) { BOOST_SPIRIT_SSTREAM stream; stream << Radix << ", " << MinDigits << ", " << MaxDigits; @@ -117,7 +117,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN template <typename T, typename RealPoliciesT> inline std::string - parser_name(real_parser<T, RealPoliciesT> const& p) + parser_name(real_parser<T, RealPoliciesT> const& /*p*/) { return std::string("real_parser"); } diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/if.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/if.hpp index b7fbb77120..9427a3714d 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/if.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/if.hpp @@ -133,7 +133,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN ////////////////////////////////// // if-parser, conditionally runs a parser is a functor condition is true. - // If the condition is fales, it fails the parse. + // If the condition is false, it fails the parse. // It can optionally become an if-else-parser through the member else_p. template <typename ParsableT, typename CondT> struct if_parser diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/impl/select.ipp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/impl/select.ipp index 531421079d..724f6fad6e 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/impl/select.ipp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/impl/select.ipp @@ -72,8 +72,9 @@ struct parse_tuple_element { typedef typename ScannerT::iterator_t iterator_t; typedef typename parser_result<parser_t, ScannerT>::type result_t; - iterator_t save(scan.first); - result_t result(t[::phoenix::tuple_index<index>()].parse(scan)); + iterator_t save(scan.first); + ::phoenix::tuple_index<index> const idx; + result_t result(t[idx].parse(scan)); if (result) { return scan.create_match(result.length(), TupleT::length - N, @@ -98,8 +99,9 @@ struct parse_tuple_element<1, ResultT, TupleT, BehaviourT> { typedef typename ScannerT::iterator_t iterator_t; typedef typename parser_result<parser_t, ScannerT>::type result_t; - iterator_t save(scan.first); - result_t result(t[::phoenix::tuple_index<index>()].parse(scan)); + iterator_t save(scan.first); + ::phoenix::tuple_index<index> const idx; + result_t result(t[idx].parse(scan)); if (result) { return scan.create_match(result.length(), TupleT::length - 1, diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/impl/switch.ipp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/impl/switch.ipp index db7471d3ec..bf5507ad58 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/impl/switch.ipp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/impl/switch.ipp @@ -222,7 +222,7 @@ struct default_case<CaseT, true> { }; /////////////////////////////////////////////////////////////////////////////// -// The case_chain template calculates recursivly the depth of the left +// The case_chain template calculates recursively the depth of the left // subchain of the given case branch node. template <typename CaseT, bool IsSimple = CaseT::is_simple> struct case_chain { @@ -240,7 +240,7 @@ struct case_chain<CaseT, true> { /////////////////////////////////////////////////////////////////////////////// // The chain_parser template is used to extract the type and the instance of -// a left or a right parser, burried arbitrary deep inside the case parser +// a left or a right parser, buried arbitrary deep inside the case parser // chain. template <int Depth, typename CaseT> struct chain_parser { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/switch.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/switch.hpp index 4a2c7e463e..44b9a72ff0 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/switch.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/dynamic/switch.hpp @@ -55,7 +55,7 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN /////////////////////////////////////////////////////////////////////////////// // // The switch_parser allows to build switch like parsing constructs, which -// will have much better perfomance as comparable straight solutions. +// will have much better performance as comparable straight solutions. // // Input stream driven syntax: // diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/iterator/fixed_size_queue.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/iterator/fixed_size_queue.hpp index 6efbf4c160..98de03889a 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/iterator/fixed_size_queue.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/iterator/fixed_size_queue.hpp @@ -6,12 +6,12 @@ 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) =============================================================================*/ -#ifndef FIXED_SIZE_QUEUE -#define FIXED_SIZE_QUEUE +#ifndef BOOST_SPIRIT_CLASSIC_ITERATOR_FIXED_SIZE_QUEUE_HPP +#define BOOST_SPIRIT_CLASSIC_ITERATOR_FIXED_SIZE_QUEUE_HPP +#include <cstddef> #include <cstdlib> #include <iterator> -#include <cstddef> #include <boost/spirit/home/classic/namespace.hpp> #include <boost/spirit/home/classic/core/assert.hpp> // for BOOST_SPIRIT_ASSERT diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/iterator/multi_pass.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/iterator/multi_pass.hpp index 771104fa03..ff27d4e2c6 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/iterator/multi_pass.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/iterator/multi_pass.hpp @@ -20,7 +20,6 @@ #include <boost/spirit/home/classic/namespace.hpp> #include <boost/spirit/home/classic/core/assert.hpp> // for BOOST_SPIRIT_ASSERT #include <boost/spirit/home/classic/iterator/fixed_size_queue.hpp> -#include <boost/detail/iterator.hpp> // for boost::detail::iterator_traits #include <boost/spirit/home/classic/iterator/multi_pass_fwd.hpp> @@ -146,15 +145,15 @@ class first_owner // thrown by buf_id_check CheckingPolicy if an instance of an iterator is // used after another one has invalidated the queue /////////////////////////////////////////////////////////////////////////////// -class illegal_backtracking : public std::exception +class BOOST_SYMBOL_VISIBLE illegal_backtracking : public std::exception { public: illegal_backtracking() BOOST_NOEXCEPT_OR_NOTHROW {} - ~illegal_backtracking() BOOST_NOEXCEPT_OR_NOTHROW {} + ~illegal_backtracking() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE {} - virtual const char* - what() const BOOST_NOEXCEPT_OR_NOTHROW + const char* + what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE { return "BOOST_SPIRIT_CLASSIC_NS::illegal_backtracking"; } }; @@ -164,7 +163,7 @@ public: // This policy is most effective when used together with the std_deque // StoragePolicy. // If used with the fixed_size_queue StoragePolicy, it will not detect -// iterator derefereces that are out of the range of the queue. +// iterator dereferences that are out of the range of the queue. /////////////////////////////////////////////////////////////////////////////// class buf_id_check { @@ -491,7 +490,7 @@ class inner { private: typedef - typename boost::detail::iterator_traits<InputT>::value_type + typename std::iterator_traits<InputT>::value_type result_type; public: @@ -516,13 +515,13 @@ class inner public: typedef - typename boost::detail::iterator_traits<InputT>::difference_type + typename std::iterator_traits<InputT>::difference_type difference_type; typedef - typename boost::detail::iterator_traits<InputT>::pointer + typename std::iterator_traits<InputT>::pointer pointer; typedef - typename boost::detail::iterator_traits<InputT>::reference + typename std::iterator_traits<InputT>::reference reference; protected: @@ -550,7 +549,7 @@ class inner } typedef - typename boost::detail::iterator_traits<InputT>::value_type + typename std::iterator_traits<InputT>::value_type value_t; void swap(inner& x) { @@ -1297,5 +1296,3 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_END }} // namespace BOOST_SPIRIT_CLASSIC_NS #endif // BOOST_SPIRIT_ITERATOR_MULTI_PASS_HPP - - diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/meta/as_parser.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/meta/as_parser.hpp index c5cc82d643..d1215fbdab 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/meta/as_parser.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/meta/as_parser.hpp @@ -18,9 +18,9 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN /////////////////////////////////////////////////////////////////////////// // - // Helper templates to derive the parser type from an auxilliary type + // Helper templates to derive the parser type from an auxiliary type // and to generate an object of the required parser type given an - // auxilliary object. Supported types to convert are parsers, + // auxiliary object. Supported types to convert are parsers, // single characters and character strings. // /////////////////////////////////////////////////////////////////////////// diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/meta/parser_traits.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/meta/parser_traits.hpp index 618aade1d7..d603d5ba43 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/meta/parser_traits.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/meta/parser_traits.hpp @@ -64,7 +64,7 @@ struct is_unary_composite { // // The is_acction_parser traits template can be used to tell if a given // parser is a action parser, i.e. it is a composite consisting of a -// auxilliary parser and an attached semantic action. +// auxiliary parser and an attached semantic action. // /////////////////////////////////////////////////////////////////////////////// template <typename ActionT> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/namespace.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/namespace.hpp index f64fc81bb6..5f1010eb71 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/namespace.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/namespace.hpp @@ -6,8 +6,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_CLASSIC_NAMESPACE_HPP) -#define SPIRIT_CLASSIC_NAMESPACE_HPP +#ifndef BOOST_SPIRIT_CLASSIC_NAMESPACE_HPP +#define BOOST_SPIRIT_CLASSIC_NAMESPACE_HPP #if defined(BOOST_SPIRIT_USE_OLD_NAMESPACE) @@ -19,7 +19,7 @@ #define BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN /*namespace classic {*/ #define BOOST_SPIRIT_CLASSIC_NS boost::spirit/*::classic*/ #define BOOST_SPIRIT_CLASSIC_NAMESPACE_END /*}*/ - + #else // This is the normal (and suggested) mode of operation when using @@ -32,4 +32,4 @@ #endif -#endif +#endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/actor.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/actor.hpp index e05b4f84ff..340159b187 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/actor.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/actor.hpp @@ -5,8 +5,8 @@ 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) ==============================================================================*/ -#ifndef PHOENIX_ACTOR_HPP -#define PHOENIX_ACTOR_HPP +#ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_ACTOR_HPP +#define BOOST_SPIRIT_CLASSIC_PHOENIX_ACTOR_HPP /////////////////////////////////////////////////////////////////////////////// #include <boost/spirit/home/classic/phoenix/tuples.hpp> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/binders.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/binders.hpp index a1d115903e..e75dafb969 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/binders.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/binders.hpp @@ -5,8 +5,8 @@ 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) ==============================================================================*/ -#ifndef PHOENIX_BINDERS_HPP -#define PHOENIX_BINDERS_HPP +#ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_BINDERS_HPP +#define BOOST_SPIRIT_CLASSIC_PHOENIX_BINDERS_HPP /////////////////////////////////////////////////////////////////////////////// #include <boost/spirit/home/classic/phoenix/functions.hpp> @@ -20,7 +20,7 @@ namespace phoenix { // // Binders // -// There are times when it is desireable to bind a simple functor, +// There are times when it is desirable to bind a simple functor, // function, member function or member variable for deferred // evaluation. This can be done through the binding facilities // provided below. There are template classes: @@ -170,7 +170,7 @@ namespace phoenix { template <typename FuncT> struct functor_action : public FuncT { -#if !defined(__BORLANDC__) && (!defined(__MWERKS__) || (__MWERKS__ > 0x3002)) +#if !defined(BOOST_BORLANDC) && (!defined(__MWERKS__) || (__MWERKS__ > 0x3002)) template < typename A = nil_t @@ -209,7 +209,7 @@ struct functor_action : public FuncT { : FuncT(fptr_) {} }; -#if defined(__BORLANDC__) || (defined(__MWERKS__) && (__MWERKS__ <= 0x3002)) +#if defined(BOOST_BORLANDC) || (defined(__MWERKS__) && (__MWERKS__ <= 0x3002)) /////////////////////////////////////////////////////////////////////////////// // @@ -2661,7 +2661,7 @@ struct bound_member bound_member(CT & c, FPT fp) : function<action_t>(action_t(c,fp)) {} -#if !defined(__BORLANDC__) +#if !defined(BOOST_BORLANDC) template <typename CT, typename FPT> bound_member(CT * c, FPT fp) : function<action_t>(action_t(c,fp)) {} diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/casts.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/casts.hpp index 84922a7608..7344180117 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/casts.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/casts.hpp @@ -7,8 +7,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#ifndef PHOENIX_CASTS_HPP -#define PHOENIX_CASTS_HPP +#ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_CASTS_HPP +#define BOOST_SPIRIT_CLASSIC_PHOENIX_CASTS_HPP /////////////////////////////////////////////////////////////////////////////// #include <boost/spirit/home/classic/phoenix/actor.hpp> @@ -183,7 +183,7 @@ const_cast_(actor<BaseAT> const& a) // A a = construct_<A>(...arbitrary list of actors...); // // where the given parameters are submitted as parameters to the -// contructor of the object of type A. (This certainly implies, that +// constructor of the object of type A. (This certainly implies, that // type A has a constructor with a fitting set of parameter types // defined.) // @@ -849,7 +849,7 @@ struct construct_15 { #endif -#if defined(__BORLANDC__) || (defined(__MWERKS__) && (__MWERKS__ <= 0x3002)) +#if defined(BOOST_BORLANDC) || (defined(__MWERKS__) && (__MWERKS__ <= 0x3002)) /////////////////////////////////////////////////////////////////////////////// // @@ -1467,4 +1467,4 @@ construct_( /////////////////////////////////////////////////////////////////////////////// } // namespace phoenix -#endif // PHOENIX_CASTS_HPP +#endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/closures.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/closures.hpp index f833b4ef59..9499e52e81 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/closures.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/closures.hpp @@ -6,8 +6,8 @@ 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) ==============================================================================*/ -#ifndef CLASSIC_PHOENIX_CLOSURES_HPP -#define CLASSIC_PHOENIX_CLOSURES_HPP +#ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_CLOSURES_HPP +#define BOOST_SPIRIT_CLASSIC_PHOENIX_CLOSURES_HPP /////////////////////////////////////////////////////////////////////////////// #include <boost/spirit/home/classic/phoenix/actor.hpp> @@ -119,7 +119,7 @@ namespace phoenix { // where 'clos' is an instance of our closure 'my_closure' above. // Take note that the usage above precludes locally declared // classes. If my_closure is a locally declared type, we can still -// use its self_type as a paramater to closure_frame: +// use its self_type as a parameter to closure_frame: // // closure_frame<my_closure::self_type> frame(clos); // @@ -271,7 +271,8 @@ public: { using namespace std; BOOST_ASSERT(frame.get() != 0); - return (*frame.get())[tuple_index<N>()]; + tuple_index<N> const idx; + return (*frame.get())[idx]; } private: diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/composite.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/composite.hpp index 30bacbc735..ed9c3d0c40 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/composite.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/composite.hpp @@ -5,8 +5,8 @@ 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) ==============================================================================*/ -#ifndef PHOENIX_COMPOSITE_HPP -#define PHOENIX_COMPOSITE_HPP +#ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_COMPOSITE_HPP +#define BOOST_SPIRIT_CLASSIC_PHOENIX_COMPOSITE_HPP /////////////////////////////////////////////////////////////////////////////// #include <boost/spirit/home/classic/phoenix/actor.hpp> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/functions.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/functions.hpp index 7e40ce958c..607a77bd5f 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/functions.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/functions.hpp @@ -5,8 +5,8 @@ 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) ==============================================================================*/ -#ifndef PHOENIX_FUNCTIONS_HPP -#define PHOENIX_FUNCTIONS_HPP +#ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_FUNCTIONS_HPP +#define BOOST_SPIRIT_CLASSIC_PHOENIX_FUNCTIONS_HPP /////////////////////////////////////////////////////////////////////////////// #include <boost/spirit/home/classic/phoenix/actor.hpp> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/new.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/new.hpp index f1a46366b0..0b015611b8 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/new.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/new.hpp @@ -8,8 +8,8 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ -#ifndef PHOENIX_NEW_HPP -#define PHOENIX_NEW_HPP +#ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_NEW_HPP +#define BOOST_SPIRIT_CLASSIC_PHOENIX_NEW_HPP /////////////////////////////////////////////////////////////////////////////// #include <boost/spirit/home/classic/phoenix/actor.hpp> @@ -54,7 +54,7 @@ BOOST_STATIC_ASSERT(PHOENIX_CONSTRUCT_LIMIT <= 15); // A *a = new_<A>(...arbitrary list of actors...); // // where the given parameters are submitted as parameters to the -// contructor of the object of type A. (This certainly implies, that +// constructor of the object of type A. (This certainly implies, that // type A has a constructor with a fitting set of parameter types // defined.) // @@ -694,7 +694,7 @@ struct new_15 { #endif -#if defined(__BORLANDC__) || (defined(__MWERKS__) && (__MWERKS__ <= 0x3002)) +#if defined(BOOST_BORLANDC) || (defined(__MWERKS__) && (__MWERKS__ <= 0x3002)) /////////////////////////////////////////////////////////////////////////////// // @@ -1312,4 +1312,4 @@ new_( /////////////////////////////////////////////////////////////////////////////// } // namespace phoenix -#endif // PHOENIX_NEW_HPP +#endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/operators.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/operators.hpp index fa4676ceca..646169d428 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/operators.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/operators.hpp @@ -5,15 +5,15 @@ 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) ==============================================================================*/ -#ifndef PHOENIX_OPERATORS_HPP -#define PHOENIX_OPERATORS_HPP +#ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_OPERATORS_HPP +#define BOOST_SPIRIT_CLASSIC_PHOENIX_OPERATORS_HPP /////////////////////////////////////////////////////////////////////////////// #if !defined(BOOST_NO_CWCTYPE) #include <cwctype> #endif -#if defined(__BORLANDC__) || (defined(__ICL) && __ICL >= 700) +#if (defined(__BORLANDC__) && !defined(__clang__)) || (defined(__ICL) && __ICL >= 700) #define CREF const& #else #define CREF @@ -290,7 +290,7 @@ struct unary_operator<dereference_op, nil_t> { }; ////////////////////////////////// -#ifndef __BORLANDC__ +#ifndef BOOST_BORLANDC template <> struct unary_operator<dereference_op, nil_t const> { @@ -345,7 +345,7 @@ struct unary_operator<post_decr_op, T> { // type of binary operators such as +. The type with the higher // rank wins and is used as the operator's return type. T1 generic // user defined type has a very high rank and always wins when -// compared against a user defined type. If this is not desireable, +// compared against a user defined type. If this is not desirable, // one can write a rank specialization for the type. // // Take note that ranks 0..9999 are reserved for the framework. diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/primitives.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/primitives.hpp index 32dd5b96e3..312e8bfd83 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/primitives.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/primitives.hpp @@ -5,8 +5,8 @@ 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) ==============================================================================*/ -#ifndef PHOENIX_PRIMITIVES_HPP -#define PHOENIX_PRIMITIVES_HPP +#ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_PRIMITIVES_HPP +#define BOOST_SPIRIT_CLASSIC_PHOENIX_PRIMITIVES_HPP /////////////////////////////////////////////////////////////////////////////// #include <boost/spirit/home/classic/phoenix/actor.hpp> @@ -56,7 +56,8 @@ struct argument { typename tuple_element<N, TupleT>::type eval(TupleT const& args) const { - return args[tuple_index<N>()]; + tuple_index<N> const idx; + return args[idx]; } }; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/special_ops.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/special_ops.hpp index c0e5265ae8..e5974fd709 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/special_ops.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/special_ops.hpp @@ -5,8 +5,8 @@ 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) ==============================================================================*/ -#ifndef PHOENIX_SPECIAL_OPS_HPP -#define PHOENIX_SPECIAL_OPS_HPP +#ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_SPECIAL_OPS_HPP +#define BOOST_SPIRIT_CLASSIC_PHOENIX_SPECIAL_OPS_HPP #include <boost/config.hpp> #ifdef BOOST_NO_STRINGSTREAM @@ -169,7 +169,7 @@ typedef PHOENIX_STD::ios_base& (*iomanip_t)(PHOENIX_STD::ios_base&); typedef PHOENIX_STD::istream& (*imanip_t)(PHOENIX_STD::istream&); typedef PHOENIX_STD::ostream& (*omanip_t)(PHOENIX_STD::ostream&); -#if defined(__BORLANDC__) +#if defined(BOOST_BORLANDC) /////////////////////////////////////////////////////////////////////////////// // @@ -195,7 +195,7 @@ omanip_t endl_ = &PHOENIX_STD::endl; omanip_t ends_ = &PHOENIX_STD::ends; omanip_t flush_ = &PHOENIX_STD::flush; -#else // __BORLANDC__ +#else // BOOST_BORLANDC /////////////////////////////////////////////////////////////////////////////// // @@ -233,7 +233,7 @@ operator<<(actor<BaseT> const& _0, iomanip_t _1) return impl::make_binary1<shift_l_op, BaseT, iomanip_t>::construct(_0, _1); } -#endif // __BORLANDC__ +#endif // BOOST_BORLANDC /////////////////////////////////////////////////////////////////////////////// // diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/statements.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/statements.hpp index dd62cb2ebb..c85df44fbf 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/statements.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/statements.hpp @@ -5,8 +5,8 @@ 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) ==============================================================================*/ -#ifndef PHOENIX_STATEMENTS_HPP -#define PHOENIX_STATEMENTS_HPP +#ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_STATEMENTS_HPP +#define BOOST_SPIRIT_CLASSIC_PHOENIX_STATEMENTS_HPP /////////////////////////////////////////////////////////////////////////////// #include <boost/spirit/home/classic/phoenix/composite.hpp> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/tuple_helpers.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/tuple_helpers.hpp index 003d018f6c..de97416061 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/tuple_helpers.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/tuple_helpers.hpp @@ -6,8 +6,8 @@ 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) ==============================================================================*/ -#ifndef PHOENIX_TUPLEHELPERS_HPP -#define PHOENIX_TUPLEHELPERS_HPP +#ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_TUPLE_HELPERS_HPP +#define BOOST_SPIRIT_CLASSIC_PHOENIX_TUPLE_HELPERS_HPP /////////////////////////////////////////////////////////////////////////////// #include <cassert> @@ -534,7 +534,8 @@ namespace impl actor_element(ActorTupleT const& actor_tuple, is_not_default) { BOOST_STATIC_ASSERT(ActorTupleT::length <= TupleResultT::length); - return actor_tuple[tuple_index<N>()](); // apply the actor + tuple_index<N> const idx; + return actor_tuple[idx](); // apply the actor } static type @@ -1072,4 +1073,4 @@ namespace impl /////////////////////////////////////////////////////////////////////////////// } // namespace phoenix -#endif // PHOENIX_TUPLEHELPERS_HPP +#endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/tuples.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/tuples.hpp index 928206c499..666e7ffe1d 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/tuples.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/phoenix/tuples.hpp @@ -5,8 +5,8 @@ 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) ==============================================================================*/ -#ifndef PHOENIX_TUPLES_HPP -#define PHOENIX_TUPLES_HPP +#ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_TUPLES_HPP +#define BOOST_SPIRIT_CLASSIC_PHOENIX_TUPLES_HPP /////////////////////////////////////////////////////////////////////////////// // @@ -21,36 +21,6 @@ #define PHOENIX_LIMIT 3 #endif -#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561) -namespace phoenix { namespace borland_only -{ - namespace ftors - { - // We define these dummy template functions. Borland complains when - // a template class has the same name as a template function, - // regardless if they are in different namespaces. - - template <typename T> void if_(T) {} - template <typename T> void for_(T) {} - template <typename T> void while_(T) {} - template <typename T> void do_(T) {} - } - - namespace tmpls - { - // We define these dummy template functions. Borland complains when - // a template class has the same name as a template function, - // regardless if they are in different namespaces. - - template <typename T> struct if_ {}; - template <typename T> struct for_ {}; - template <typename T> struct while_ {}; - template <typename T> struct do_ {}; - } - -}} // namespace phoenix::borland_only -#endif - /////////////////////////////////////////////////////////////////////////////// #include <boost/static_assert.hpp> #include <boost/call_traits.hpp> @@ -59,6 +29,8 @@ namespace phoenix { namespace borland_only #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) #pragma warning(push) #pragma warning(disable:4512) //assignment operator could not be generated +// bogus https://developercommunity.visualstudio.com/t/buggy-warning-c4709/471956 +#pragma warning(disable:4709) //comma operator within array index expression #endif /////////////////////////////////////////////////////////////////////////////// diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/utility/impl/escape_char.ipp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/utility/impl/escape_char.ipp index a592a49312..6e19043c8d 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/utility/impl/escape_char.ipp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/utility/impl/escape_char.ipp @@ -166,7 +166,7 @@ namespace impl { return scan.no_match(); // overflow detected } }; -#if (defined(BOOST_MSVC) && (BOOST_MSVC <= 1310)) +#if defined(BOOST_MSVC) #pragma warning(pop) #endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/version.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/version.hpp index d9357c27e1..545e0ce389 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/version.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/classic/version.hpp @@ -5,26 +5,15 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_CLASSIC_VERSION_HPP) -#define SPIRIT_CLASSIC_VERSION_HPP - -/////////////////////////////////////////////////////////////////////////////// -// -// This checks, whether the used Boost library is at least V1.32.0 -// -/////////////////////////////////////////////////////////////////////////////// -#include <boost/version.hpp> - -#if BOOST_VERSION < 103200 -#error "Spirit v1.8.x needs at least Boost V1.32.0 to compile successfully." -#endif +#ifndef BOOST_SPIRIT_CLASSIC_VERSION_HPP +#define BOOST_SPIRIT_CLASSIC_VERSION_HPP /////////////////////////////////////////////////////////////////////////////// // // This is the version of the current Spirit distribution // /////////////////////////////////////////////////////////////////////////////// -#define SPIRIT_VERSION 0x1808 +#define SPIRIT_VERSION 0x1811 #define SPIRIT_PIZZA_VERSION SPIRIT_MEGA_VEGGI // :-) -#endif // defined(SPIRIT_VERSION_HPP) +#endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/auxiliary/lazy.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/auxiliary/lazy.hpp index ada7bc5187..d0cbd823b3 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/auxiliary/lazy.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/auxiliary/lazy.hpp @@ -18,12 +18,18 @@ #include <boost/spirit/home/support/unused.hpp> #include <boost/spirit/home/support/info.hpp> #include <boost/spirit/home/support/lazy.hpp> -#include <boost/spirit/include/phoenix_core.hpp> #include <boost/fusion/include/at.hpp> #include <boost/utility/result_of.hpp> +#include <boost/proto/make_expr.hpp> #include <boost/type_traits/remove_reference.hpp> #include <boost/mpl/not.hpp> +namespace boost { namespace phoenix +{ + template <typename Expr> + struct actor; +}} + namespace boost { namespace spirit { /////////////////////////////////////////////////////////////////////////// @@ -140,7 +146,7 @@ namespace boost { namespace spirit { namespace karma Modifiers modifiers; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(lazy_generator& operator= (lazy_generator const&)); + BOOST_DELETED_FUNCTION(lazy_generator& operator= (lazy_generator const&)) }; /////////////////////////////////////////////////////////////////////////// diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/attributes.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/attributes.hpp index c63faace37..c3630ede2b 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/attributes.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/attributes.hpp @@ -4,8 +4,8 @@ // 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) -#if !defined(SPIRIT_KARMA_DETAIL_ATTRIBUTES_APR_18_2010_0453PM) -#define SPIRIT_KARMA_DETAIL_ATTRIBUTES_APR_18_2010_0453PM +#ifndef BOOST_SPIRIT_KARMA_DETAIL_ATTRIBUTES_HPP +#define BOOST_SPIRIT_KARMA_DETAIL_ATTRIBUTES_HPP #include <boost/spirit/home/karma/domain.hpp> #include <boost/spirit/home/support/attributes_fwd.hpp> @@ -44,22 +44,6 @@ namespace boost { namespace spirit { namespace karma // Karma only, no post() and no fail() required }; - // reference types need special handling - template <typename Exposed, typename Transformed> - struct transform_attribute<Exposed&, Transformed> - : transform_attribute<Exposed, Transformed> - {}; - - template <typename Exposed, typename Transformed> - struct transform_attribute<Exposed const&, Transformed> - : transform_attribute<Exposed const, Transformed> - {}; - - template <typename Attribute> - struct transform_attribute<Attribute const&, Attribute> - : transform_attribute<Attribute const, Attribute> - {}; - // unused_type needs some special handling as well template <> struct transform_attribute<unused_type, unused_type> @@ -74,16 +58,6 @@ namespace boost { namespace spirit { namespace karma {}; template <typename Attribute> - struct transform_attribute<unused_type, Attribute> - : transform_attribute<unused_type, unused_type> - {}; - - template <typename Attribute> - struct transform_attribute<unused_type const, Attribute> - : transform_attribute<unused_type, unused_type> - {}; - - template <typename Attribute> struct transform_attribute<Attribute, unused_type> : transform_attribute<unused_type, unused_type> {}; @@ -95,14 +69,12 @@ namespace boost { namespace spirit { namespace karma }}} /////////////////////////////////////////////////////////////////////////////// -namespace boost { namespace spirit { namespace traits +namespace boost { namespace spirit { namespace traits { namespace detail { template <typename Exposed, typename Transformed> - struct transform_attribute<Exposed, Transformed, karma::domain> + struct transform_attribute_base<Exposed, Transformed, karma::domain> : karma::transform_attribute<Exposed, Transformed> {}; -}}} +}}}} #endif - - diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/extract_from.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/extract_from.hpp index 558d056352..f0ec22d939 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/extract_from.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/extract_from.hpp @@ -10,7 +10,6 @@ #pragma once #endif -#include <boost/spirit/include/phoenix_core.hpp> #include <boost/spirit/home/support/unused.hpp> #include <boost/spirit/home/support/attributes_fwd.hpp> #include <boost/spirit/home/karma/detail/attributes.hpp> @@ -44,40 +43,45 @@ namespace boost { namespace spirit { namespace traits } // This is the default case: the plain attribute values - template <typename Attribute, typename Exposed, typename Enable/*= void*/> - struct extract_from_attribute + template <typename Attribute, typename Exposed + , bool IsOneElemSeq = traits::one_element_sequence<Attribute>::value> + struct extract_from_attribute_base { - typedef typename traits::one_element_sequence<Attribute>::type - is_one_element_sequence; - - typedef typename mpl::eval_if< - is_one_element_sequence - , detail::value_at_c<Attribute, 0> - , mpl::identity<Attribute const&> - >::type type; + typedef Attribute const& type; template <typename Context> - static type call(Attribute const& attr, Context&, mpl::false_) + static type call(Attribute const& attr, Context&) { return attr; } + }; - // This handles the case where the attribute is a single element fusion - // sequence. We silently extract the only element and treat it as the - // attribute to generate output from. - template <typename Context> - static type call(Attribute const& attr, Context& ctx, mpl::true_) - { - return extract_from<Exposed>(fusion::at_c<0>(attr), ctx); - } + // This handles the case where the attribute is a single element fusion + // sequence. We silently extract the only element and treat it as the + // attribute to generate output from. + template <typename Attribute, typename Exposed> + struct extract_from_attribute_base<Attribute, Exposed, true> + { + typedef typename remove_const< + typename remove_reference< + typename fusion::result_of::at_c<Attribute, 0>::type + >::type + >::type elem_type; + + typedef typename result_of::extract_from<Exposed, elem_type>::type type; template <typename Context> static type call(Attribute const& attr, Context& ctx) { - return call(attr, ctx, is_one_element_sequence()); + return extract_from<Exposed>(fusion::at_c<0>(attr), ctx); } }; + template <typename Attribute, typename Exposed, typename Enable/*= void*/> + struct extract_from_attribute + : extract_from_attribute_base<Attribute, Exposed> + {}; + // This handles optional attributes. template <typename Attribute, typename Exposed> struct extract_from_attribute<boost::optional<Attribute>, Exposed> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/output_iterator.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/output_iterator.hpp index 75c984a9bc..137e345dd8 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/output_iterator.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/output_iterator.hpp @@ -191,7 +191,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail // wchar_t is only 16-bits on Windows. If BOOST_SPIRIT_UNICODE is // defined, the character type is 32-bits wide so we need to make // sure the buffer is at least that wide. -#if defined(BOOST_MSVC) && defined(BOOST_SPIRIT_UNICODE) +#if (defined(_MSC_VER) || defined(__SIZEOF_WCHAR_T__) && __SIZEOF_WCHAR_T__ == 2) && defined(BOOST_SPIRIT_UNICODE) typedef spirit::char_encoding::unicode::char_type buffer_char_type; #else typedef wchar_t buffer_char_type; @@ -237,9 +237,12 @@ namespace boost { namespace spirit { namespace karma { namespace detail buffer.begin() + (std::min)(buffer.size(), maxwidth); #if defined(BOOST_MSVC) -#pragma warning(pop) +#pragma warning(disable: 4244) // conversion from 'x' to 'y', possible loss of data #endif std::copy(buffer.begin(), end, sink); +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif return true; } template <typename RestIterator> @@ -253,9 +256,12 @@ namespace boost { namespace spirit { namespace karma { namespace detail buffer.begin() + (std::min)(buffer.size(), start_at); #if defined(BOOST_MSVC) -#pragma warning(pop) +#pragma warning(disable: 4244) // conversion from 'x' to 'y', possible loss of data #endif std::copy(begin, buffer.end(), sink); +#if defined(BOOST_MSVC) +#pragma warning(pop) +#endif return true; } @@ -383,7 +389,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail , output_iterator<OutputIterator, Properties, Derived> >::type most_derived_type; - enum { properties = Properties::value }; + static const generator_properties::enum_type properties = static_cast<generator_properties::enum_type>(Properties::value); typedef typename mpl::if_c< (properties & generator_properties::tracking) ? true : false diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/string_generate.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/string_generate.hpp index 7acfbe1a1f..d37480b436 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/string_generate.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/string_generate.hpp @@ -10,10 +10,10 @@ #pragma once #endif -#include <string> #include <boost/spirit/home/support/char_class.hpp> #include <boost/spirit/home/karma/detail/generate_to.hpp> -#include <boost/range/const_iterator.hpp> +#include <boost/range/begin.hpp> +#include <boost/range/end.hpp> namespace boost { namespace spirit { namespace karma { namespace detail { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/unused_delimiter.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/unused_delimiter.hpp index acb4fe2df5..cec13cac17 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/unused_delimiter.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/detail/unused_delimiter.hpp @@ -22,7 +22,7 @@ namespace boost { namespace spirit { namespace karma { namespace detail Delimiter const& delimiter; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(unused_delimiter& operator= (unused_delimiter const&)); + BOOST_DELETED_FUNCTION(unused_delimiter& operator= (unused_delimiter const&)) }; // If a surrounding verbatim[] directive was specified, the current diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/meta_compiler.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/meta_compiler.hpp index 9928579e7c..3b8ea5e212 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/meta_compiler.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/meta_compiler.hpp @@ -15,6 +15,7 @@ #include <boost/spirit/home/karma/domain.hpp> #include <boost/spirit/home/karma/generator.hpp> #include <boost/spirit/home/support/string_traits.hpp> +#include <boost/proto/tags.hpp> #include <boost/type_traits/remove_reference.hpp> #include <boost/utility/enable_if.hpp> #include <boost/fusion/include/at.hpp> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp index a36893e57e..77cfba40cd 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp @@ -19,10 +19,11 @@ #include <boost/spirit/home/support/unused.hpp> #include <boost/spirit/home/support/numeric_traits.hpp> #include <boost/spirit/home/support/detail/pow10.hpp> -#include <boost/spirit/home/support/detail/sign.hpp> #include <boost/spirit/home/karma/detail/generate_to.hpp> #include <boost/spirit/home/karma/detail/string_generate.hpp> +#include <boost/core/cmath.hpp> + /////////////////////////////////////////////////////////////////////////////// // // The value BOOST_KARMA_NUMERICS_LOOP_UNROLL specifies, how to unroll the @@ -68,7 +69,11 @@ namespace boost { namespace spirit { namespace traits typedef unsignedtype type; \ static type call(signedtype n) \ { \ - return static_cast<unsignedtype>((n >= 0) ? n : -n); \ + /* implementation is well-defined for one's complement, */ \ + /* two's complement, and signed magnitude architectures */ \ + /* by the C++ Standard. [conv.integral] [expr.unary.op] */ \ + return (n >= 0) ? static_cast<type>(n) \ + : -static_cast<type>(n); \ } \ } \ /**/ @@ -84,6 +89,11 @@ namespace boost { namespace spirit { namespace traits } \ /**/ +#if defined(BOOST_MSVC) +# pragma warning(push) +// unary minus operator applied to unsigned type, result still unsigned +# pragma warning(disable: 4146) +#endif BOOST_SPIRIT_ABSOLUTE_VALUE(signed char, unsigned char); BOOST_SPIRIT_ABSOLUTE_VALUE(char, unsigned char); BOOST_SPIRIT_ABSOLUTE_VALUE(short, unsigned short); @@ -97,6 +107,9 @@ namespace boost { namespace spirit { namespace traits BOOST_SPIRIT_ABSOLUTE_VALUE(boost::long_long_type, boost::ulong_long_type); BOOST_SPIRIT_ABSOLUTE_VALUE_UNSIGNED(boost::ulong_long_type); #endif +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif #undef BOOST_SPIRIT_ABSOLUTE_VALUE #undef BOOST_SPIRIT_ABSOLUTE_VALUE_UNSIGNED @@ -107,7 +120,7 @@ namespace boost { namespace spirit { namespace traits typedef float type; static type call(float n) { - return (spirit::detail::signbit)(n) ? -n : n; + return (std::fabs)(n); } }; @@ -117,7 +130,7 @@ namespace boost { namespace spirit { namespace traits typedef double type; static type call(double n) { - return (spirit::detail::signbit)(n) ? -n : n; + return (std::fabs)(n); } }; @@ -127,7 +140,7 @@ namespace boost { namespace spirit { namespace traits typedef long double type; static type call(long double n) { - return (spirit::detail::signbit)(n) ? -n : n; + return (std::fabs)(n); } }; @@ -164,7 +177,7 @@ namespace boost { namespace spirit { namespace traits { static bool call(float n) { - return (spirit::detail::signbit)(n) ? true : false; + return (core::signbit)(n) ? true : false; } }; @@ -173,7 +186,7 @@ namespace boost { namespace spirit { namespace traits { static bool call(double n) { - return (spirit::detail::signbit)(n) ? true : false; + return (core::signbit)(n) ? true : false; } }; @@ -182,7 +195,7 @@ namespace boost { namespace spirit { namespace traits { static bool call(long double n) { - return (spirit::detail::signbit)(n) ? true : false; + return (core::signbit)(n) ? true : false; } }; @@ -207,7 +220,7 @@ namespace boost { namespace spirit { namespace traits { static bool call(float n) { - return (math::fpclassify)(n) == FP_ZERO; + return (core::fpclassify)(n) == core::fp_zero; } }; @@ -216,7 +229,7 @@ namespace boost { namespace spirit { namespace traits { static bool call(double n) { - return (math::fpclassify)(n) == FP_ZERO; + return (core::fpclassify)(n) == core::fp_zero; } }; @@ -225,7 +238,7 @@ namespace boost { namespace spirit { namespace traits { static bool call(long double n) { - return (math::fpclassify)(n) == FP_ZERO; + return (core::fpclassify)(n) == core::fp_zero; } }; @@ -251,7 +264,7 @@ namespace boost { namespace spirit { namespace traits { static bool call(float n) { - return (math::fpclassify)(n) == FP_NAN; + return (core::fpclassify)(n) == core::fp_nan; } }; @@ -260,7 +273,7 @@ namespace boost { namespace spirit { namespace traits { static bool call(double n) { - return (math::fpclassify)(n) == FP_NAN; + return (core::fpclassify)(n) == core::fp_nan; } }; @@ -269,7 +282,7 @@ namespace boost { namespace spirit { namespace traits { static bool call(long double n) { - return (math::fpclassify)(n) == FP_NAN; + return (core::fpclassify)(n) == core::fp_nan; } }; @@ -285,9 +298,8 @@ namespace boost { namespace spirit { namespace traits { static bool call(T n) { - if (!std::numeric_limits<T>::has_infinity) - return false; - return (n == std::numeric_limits<T>::infinity()) ? true : false; + return std::numeric_limits<T>::has_infinity + && n == std::numeric_limits<T>::infinity(); } }; @@ -296,7 +308,7 @@ namespace boost { namespace spirit { namespace traits { static bool call(float n) { - return (math::fpclassify)(n) == FP_INFINITE; + return (core::fpclassify)(n) == core::fp_infinite; } }; @@ -305,7 +317,7 @@ namespace boost { namespace spirit { namespace traits { static bool call(double n) { - return (math::fpclassify)(n) == FP_INFINITE; + return (core::fpclassify)(n) == core::fp_infinite; } }; @@ -314,7 +326,7 @@ namespace boost { namespace spirit { namespace traits { static bool call(long double n) { - return (math::fpclassify)(n) == FP_INFINITE; + return (core::fpclassify)(n) == core::fp_infinite; } }; @@ -562,12 +574,12 @@ namespace boost { namespace spirit { namespace karma /////////////////////////////////////////////////////////////////////////// #define BOOST_KARMA_NUMERICS_INNER_LOOP_PREFIX(z, x, data) \ if (!traits::test_zero(n)) { \ - int ch = radix_type::call(remainder_type::call(n)); \ + int ch_##x = radix_type::call(remainder_type::call(n)); \ n = divide_type::call(n, num, ++exp); \ /**/ -#define BOOST_KARMA_NUMERICS_INNER_LOOP_SUFFIX(z, x, data) \ - *sink = char(ch); \ +#define BOOST_KARMA_NUMERICS_INNER_LOOP_SUFFIX(z, x, n_rolls_sub1) \ + *sink = char(BOOST_PP_CAT(ch_, BOOST_PP_SUB(n_rolls_sub1, x))); \ ++sink; \ } \ /**/ @@ -598,7 +610,8 @@ namespace boost { namespace spirit { namespace karma BOOST_PP_REPEAT( BOOST_KARMA_NUMERICS_LOOP_UNROLL, - BOOST_KARMA_NUMERICS_INNER_LOOP_SUFFIX, _); + BOOST_KARMA_NUMERICS_INNER_LOOP_SUFFIX, + BOOST_PP_DEC(BOOST_KARMA_NUMERICS_LOOP_UNROLL)); *sink = char(ch); ++sink; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/action.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/action.hpp index d963b75771..5819a51a69 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/action.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/action.hpp @@ -4,8 +4,8 @@ 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) ==============================================================================*/ -#if !defined(SPIRIT_ACTION_JANUARY_07_2007_1233PM) -#define SPIRIT_ACTION_JANUARY_07_2007_1233PM +#ifndef BOOST_SPIRIT_QI_ACTION_HPP +#define BOOST_SPIRIT_QI_ACTION_HPP #if defined(_MSC_VER) #pragma once diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/action/action.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/action/action.hpp index 31b279909b..a123d6035a 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/action/action.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/action/action.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_ACTION_JANUARY_07_2007_1128AM) -#define SPIRIT_ACTION_JANUARY_07_2007_1128AM +#ifndef BOOST_SPIRIT_QI_ACTION_ACTION_HPP +#define BOOST_SPIRIT_QI_ACTION_ACTION_HPP #if defined(_MSC_VER) #pragma once @@ -52,14 +52,12 @@ namespace boost { namespace spirit { namespace qi , Attribute& attr_) const { typedef typename attribute<Context, Iterator>::type attr_type; - typedef traits::make_attribute<attr_type, Attribute> make_attribute; // create an attribute if one is not supplied typedef traits::transform_attribute< - typename make_attribute::type, attr_type, domain> transform; + Attribute, attr_type, domain> transform; - typename make_attribute::type made_attr = make_attribute::call(attr_); - typename transform::type attr = transform::pre(made_attr); + typename transform::type attr = transform::pre(attr_); Iterator save = first; if (subject.parse(first, last, context, skipper, attr)) @@ -70,7 +68,7 @@ namespace boost { namespace spirit { namespace qi { // Do up-stream transformation, this integrates the results // back into the original attribute value, if appropriate. - traits::post_transform(attr_, attr); + transform::post(attr_, attr); return true; } @@ -109,14 +107,9 @@ namespace boost { namespace spirit { namespace qi , unused_type) const { typedef typename attribute<Context, Iterator>::type attr_type; - typedef traits::make_attribute<attr_type, unused_type> make_attribute; // synthesize the attribute since one is not supplied - typedef traits::transform_attribute< - typename make_attribute::type, attr_type, domain> transform; - - typename make_attribute::type made_attr = make_attribute::call(unused_type()); - typename transform::type attr = transform::pre(made_attr); + attr_type attr = attr_type(); Iterator save = first; if (subject.parse(first, last, context, skipper, attr)) @@ -145,7 +138,7 @@ namespace boost { namespace spirit { namespace qi Action f; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(action& operator= (action const&)); + BOOST_DELETED_FUNCTION(action& operator= (action const&)) action(const action&) = default; }; }}} diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/auxiliary/lazy.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/auxiliary/lazy.hpp index 60b61d4ce4..d0f2f687f2 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/auxiliary/lazy.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/auxiliary/lazy.hpp @@ -18,12 +18,19 @@ #include <boost/spirit/home/support/unused.hpp> #include <boost/spirit/home/support/info.hpp> #include <boost/spirit/home/support/lazy.hpp> -#include <boost/spirit/include/phoenix_core.hpp> #include <boost/fusion/include/at.hpp> #include <boost/utility/result_of.hpp> +#include <boost/proto/make_expr.hpp> +#include <boost/proto/tags.hpp> #include <boost/type_traits/remove_reference.hpp> #include <boost/mpl/not.hpp> +namespace boost { namespace phoenix +{ + template <typename Expr> + struct actor; +}} + namespace boost { namespace spirit { /////////////////////////////////////////////////////////////////////////// diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/char/char_parser.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/char/char_parser.hpp index 1d06d7cf8a..ea497f1f12 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/char/char_parser.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/char/char_parser.hpp @@ -18,6 +18,8 @@ #include <boost/spirit/home/qi/skip_over.hpp> #include <boost/spirit/home/support/unused.hpp> #include <boost/spirit/home/support/info.hpp> +#include <boost/proto/operators.hpp> +#include <boost/proto/tags.hpp> namespace boost { namespace spirit { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/alternative_function.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/alternative_function.hpp index 1e137b8bbb..c0c4a96a00 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/alternative_function.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/alternative_function.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_ALTERNATIVE_FUNCTION_APRIL_23_2007_1046AM) -#define SPIRIT_ALTERNATIVE_FUNCTION_APRIL_23_2007_1046AM +#ifndef BOOST_SPIRIT_QI_DETAIL_ALTERNATIVE_FUNCTION_HPP +#define BOOST_SPIRIT_QI_DETAIL_ALTERNATIVE_FUNCTION_HPP #if defined(_MSC_VER) #pragma once @@ -20,24 +20,22 @@ namespace boost { namespace spirit { namespace qi { namespace detail { - template <typename Variant, typename Expected> + template <typename Variant, typename T> struct find_substitute { - // Get the type from the variant that can be a substitute for Expected. - // If none is found, just return Expected + // Get the type from the Variant that can be a substitute for T. + // If none is found, just return T typedef Variant variant_type; typedef typename variant_type::types types; typedef typename mpl::end<types>::type end; - typedef typename - mpl::find_if<types, is_same<mpl::_1, Expected> >::type - iter_1; + typedef typename mpl::find<types, T>::type iter_1; typedef typename mpl::eval_if< is_same<iter_1, end>, - mpl::find_if<types, traits::is_substitute<mpl::_1, Expected> >, + mpl::find_if<types, traits::is_substitute<T, mpl::_1> >, mpl::identity<iter_1> >::type iter; @@ -45,7 +43,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail typedef typename mpl::eval_if< is_same<iter, end>, - mpl::identity<Expected>, + mpl::identity<T>, mpl::deref<iter> >::type type; @@ -177,7 +175,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail Attribute& attr; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(alternative_function& operator= (alternative_function const&)); + BOOST_DELETED_FUNCTION(alternative_function& operator= (alternative_function const&)) alternative_function(const alternative_function&) = default; }; @@ -205,7 +203,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail Skipper const& skipper; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(alternative_function& operator= (alternative_function const&)); + BOOST_DELETED_FUNCTION(alternative_function& operator= (alternative_function const&)) alternative_function(const alternative_function&) = default; }; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/assign_to.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/assign_to.hpp index 7e5b162d06..90299ba2c3 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/assign_to.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/assign_to.hpp @@ -20,7 +20,7 @@ #include <boost/fusion/include/copy.hpp> #include <boost/fusion/adapted/struct/detail/extension.hpp> #include <boost/ref.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/range_fwd.hpp> namespace boost { namespace spirit { namespace traits { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/attributes.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/attributes.hpp index 6e8ce13f83..24d1f4fe99 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/attributes.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/attributes.hpp @@ -4,8 +4,8 @@ // 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) -#if !defined(SPIRIT_QI_DETAIL_ATTRIBUTES_APR_18_2010_0458PM) -#define SPIRIT_QI_DETAIL_ATTRIBUTES_APR_18_2010_0458PM +#ifndef BOOST_SPIRIT_QI_DETAIL_ATTRIBUTES_HPP +#define BOOST_SPIRIT_QI_DETAIL_ATTRIBUTES_HPP #include <boost/spirit/home/qi/domain.hpp> #include <boost/spirit/home/support/attributes_fwd.hpp> @@ -94,16 +94,6 @@ namespace boost { namespace spirit { namespace qi } }; - // reference types need special handling - template <typename Attribute> - struct transform_attribute<Attribute&, Attribute> - { - typedef Attribute& type; - static Attribute& pre(Attribute& val) { return val; } - static void post(Attribute&, Attribute const&) {} - static void fail(Attribute&) {} - }; - // unused_type needs some special handling as well template <> struct transform_attribute<unused_type, unused_type> @@ -120,16 +110,6 @@ namespace boost { namespace spirit { namespace qi {}; template <typename Attribute> - struct transform_attribute<unused_type, Attribute> - : transform_attribute<unused_type, unused_type> - {}; - - template <typename Attribute> - struct transform_attribute<unused_type const, Attribute> - : transform_attribute<unused_type, unused_type> - {}; - - template <typename Attribute> struct transform_attribute<Attribute, unused_type> : transform_attribute<unused_type, unused_type> {}; @@ -143,33 +123,11 @@ namespace boost { namespace spirit { namespace qi /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace spirit { namespace traits { - template <typename Exposed, typename Transformed> - struct transform_attribute<Exposed, Transformed, qi::domain> - : qi::transform_attribute<Exposed, Transformed> - {}; - - template <typename Exposed, typename Transformed> - struct transform_attribute<Exposed&, Transformed, qi::domain> - : transform_attribute<Exposed, Transformed, qi::domain> - {}; - - template <typename Attribute> - struct transform_attribute<Attribute&, Attribute, qi::domain> - : qi::transform_attribute<Attribute&, Attribute> - {}; - - /////////////////////////////////////////////////////////////////////////// - template <typename Exposed, typename Transformed> - void post_transform(Exposed& dest, Transformed const& attr) - { - return transform_attribute<Exposed, Transformed, qi::domain>::post(dest, attr); - } - - /////////////////////////////////////////////////////////////////////////// - template <typename Exposed, typename Transformed> - void fail_transform(Exposed& dest, Transformed const&) - { - return transform_attribute<Exposed, Transformed, qi::domain>::fail(dest); + namespace detail { + template <typename Exposed, typename Transformed> + struct transform_attribute_base<Exposed, Transformed, qi::domain> + : qi::transform_attribute<Exposed, Transformed> + {}; } }}} diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/expect_function.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/expect_function.hpp index 211118ba0d..bc829be046 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/expect_function.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/expect_function.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_EXPECT_FUNCTION_APR_29_2007_0558PM) -#define SPIRIT_EXPECT_FUNCTION_APR_29_2007_0558PM +#ifndef BOOST_SPIRIT_QI_DETAIL_EXPECT_FUNCTION_HPP +#define BOOST_SPIRIT_QI_DETAIL_EXPECT_FUNCTION_HPP #if defined(_MSC_VER) #pragma once @@ -97,7 +97,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail mutable bool is_first; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(expect_function& operator= (expect_function const&)); + BOOST_DELETED_FUNCTION(expect_function& operator= (expect_function const&)) expect_function(const expect_function&) = default; }; }}}} diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/expectation_failure.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/expectation_failure.hpp index e36ec2742d..551be1cacb 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/expectation_failure.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/expectation_failure.hpp @@ -4,8 +4,8 @@ Copyright (c) 2001-2011 Joel de Guzman 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) =============================================================================*/ -#if !defined(SPIRIT_EXPECTATION_FAILURE_JULY_19_2016) -#define SPIRIT_EXPECTATION_FAILURE_JULY_19_2016 +#ifndef BOOST_SPIRIT_QI_DETAIL_EXPECTATION_FAILURE_HPP +#define BOOST_SPIRIT_QI_DETAIL_EXPECTATION_FAILURE_HPP #if defined(_MSC_VER) #pragma once @@ -13,17 +13,18 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include <boost/spirit/home/support/info.hpp> +#include <boost/config.hpp> // for BOOST_SYMBOL_VISIBLE #include <stdexcept> namespace boost { namespace spirit { namespace qi { template <typename Iterator> - struct expectation_failure : std::runtime_error + struct BOOST_SYMBOL_VISIBLE expectation_failure : std::runtime_error { expectation_failure(Iterator first_, Iterator last_, info const& what) : std::runtime_error("boost::spirit::qi::expectation_failure") , first(first_), last(last_), what_(what) {} - ~expectation_failure() BOOST_NOEXCEPT_OR_NOTHROW {} + ~expectation_failure() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE {} Iterator first; Iterator last; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/fail_function.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/fail_function.hpp index 9d0e9a7c17..14da766f8f 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/fail_function.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/fail_function.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_FAIL_FUNCTION_APRIL_22_2006_0159PM) -#define SPIRIT_FAIL_FUNCTION_APRIL_22_2006_0159PM +#ifndef BOOST_SPIRIT_QI_DETAIL_FAIL_FUNCTION_HPP +#define BOOST_SPIRIT_QI_DETAIL_FAIL_FUNCTION_HPP #if defined(_MSC_VER) #pragma once @@ -51,7 +51,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail Skipper const& skipper; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(fail_function& operator= (fail_function const&)); + BOOST_DELETED_FUNCTION(fail_function& operator= (fail_function const&)) fail_function(const fail_function&) = default; }; }}}} diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/pass_container.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/pass_container.hpp index 777dc8985b..fdf9311d1c 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/pass_container.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/pass_container.hpp @@ -5,8 +5,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_PASS_CONTAINER_JANUARY_06_2009_0802PM) -#define SPIRIT_PASS_CONTAINER_JANUARY_06_2009_0802PM +#ifndef BOOST_SPIRIT_QI_DETAIL_PASS_CONTAINER_HPP +#define BOOST_SPIRIT_QI_DETAIL_PASS_CONTAINER_HPP #if defined(_MSC_VER) #pragma once @@ -355,7 +355,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail Attr& attr; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(pass_container& operator= (pass_container const&)); + BOOST_DELETED_FUNCTION(pass_container& operator= (pass_container const&)) pass_container(const pass_container&) = default; }; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/pass_function.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/pass_function.hpp index 8bfd6dcb83..1c3c3dd17d 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/pass_function.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/pass_function.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_PASS_FUNCTION_FEBRUARY_05_2007_1138AM) -#define SPIRIT_PASS_FUNCTION_FEBRUARY_05_2007_1138AM +#ifndef BOOST_SPIRIT_QI_DETAIL_PASS_FUNCTION_HPP +#define BOOST_SPIRIT_QI_DETAIL_PASS_FUNCTION_HPP #if defined(_MSC_VER) #pragma once @@ -62,7 +62,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail Skipper const& skipper; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(pass_function& operator= (pass_function const&)); + BOOST_DELETED_FUNCTION(pass_function& operator= (pass_function const&)) }; }}}} diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/permute_function.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/permute_function.hpp index bec82d9c15..d0b87655e0 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/permute_function.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/permute_function.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_PERMUTE_FUNCTION_MARCH_13_2007_1129AM) -#define SPIRIT_PERMUTE_FUNCTION_MARCH_13_2007_1129AM +#ifndef BOOST_SPIRIT_QI_DETAIL_PERMUTE_FUNCTION_HPP +#define BOOST_SPIRIT_QI_DETAIL_PERMUTE_FUNCTION_HPP #if defined(_MSC_VER) #pragma once @@ -64,7 +64,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail bool* taken; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(permute_function& operator= (permute_function const&)); + BOOST_DELETED_FUNCTION(permute_function& operator= (permute_function const&)) }; }}}} diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/unused_skipper.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/unused_skipper.hpp index 494881820e..f8b6bf9984 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/unused_skipper.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/detail/unused_skipper.hpp @@ -23,7 +23,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail Skipper const& skipper; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(unused_skipper& operator= (unused_skipper const&)); + BOOST_DELETED_FUNCTION(unused_skipper& operator= (unused_skipper const&)) }; template <typename Skipper> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/as.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/as.hpp index e0376eb2ec..4a76824f07 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/as.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/as.hpp @@ -6,8 +6,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_AS_DECEMBER_6_2010_1013AM) -#define SPIRIT_AS_DECEMBER_6_2010_1013AM +#ifndef BOOST_SPIRIT_QI_DIRECTIVE_AS_HPP +#define BOOST_SPIRIT_QI_DIRECTIVE_AS_HPP #if defined(_MSC_VER) #pragma once @@ -25,8 +25,6 @@ #include <boost/spirit/home/support/handles_container.hpp> #include <boost/spirit/home/support/assert_msg.hpp> #include <boost/spirit/home/support/container.hpp> -#include <boost/range/iterator_range.hpp> -#include <string> namespace boost { namespace spirit { namespace qi { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/encoding.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/encoding.hpp index 5eaf0f6b50..27ef8a1fd5 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/encoding.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/encoding.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_ENCODING_MARCH_05_2010_0528PM) -#define SPIRIT_ENCODING_MARCH_05_2010_0528PM +#ifndef BOOST_SPIRIT_QI_DIRECTIVE_ENCODING_HPP +#define BOOST_SPIRIT_QI_DIRECTIVE_ENCODING_HPP #if defined(_MSC_VER) #pragma once diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/expect.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/expect.hpp index 7892c9c32d..9f238b9f3c 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/expect.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/expect.hpp @@ -4,8 +4,8 @@ Copyright (c) 2016 Frank Hein, maxence business consulting gmbh 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) ==============================================================================*/ -#if !defined (SPIRIT_EXPECT_JULY_13_2016) -#define SPIRIT_EXPECT_JULY_13_2016 +#ifndef BOOST_SPIRIT_QI_DIRECTIVE_EXPECT_HPP +#define BOOST_SPIRIT_QI_DIRECTIVE_EXPECT_HPP #if defined(_MSC_VER) #pragma once diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/hold.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/hold.hpp index 9cd905cf79..c9cbf54d5b 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/hold.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/hold.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_HOLD_FEBRUARY_6_2010_0917AM) -#define SPIRIT_HOLD_FEBRUARY_6_2010_0917AM +#ifndef BOOST_SPIRIT_QI_DIRECTIVE_HOLD_HPP +#define BOOST_SPIRIT_QI_DIRECTIVE_HOLD_HPP #if defined(_MSC_VER) #pragma once diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/lexeme.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/lexeme.hpp index 691d4fa52c..9dc0a57bb4 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/lexeme.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/lexeme.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_LEXEME_MARCH_24_2007_0802AM) -#define SPIRIT_LEXEME_MARCH_24_2007_0802AM +#ifndef BOOST_SPIRIT_QI_DIRECTIVE_LEXEME_HPP +#define BOOST_SPIRIT_QI_DIRECTIVE_LEXEME_HPP #if defined(_MSC_VER) #pragma once diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/matches.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/matches.hpp index 31daaaefab..f56f4b6a9b 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/matches.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/matches.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_MATCHES_JAN_07_2010_0745PM) -#define SPIRIT_MATCHES_JAN_07_2010_0745PM +#ifndef BOOST_SPIRIT_QI_DIRECTIVE_MATCHES_HPP +#define BOOST_SPIRIT_QI_DIRECTIVE_MATCHES_HPP #if defined(_MSC_VER) #pragma once @@ -72,7 +72,7 @@ namespace boost { namespace spirit { namespace qi Subject subject; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(matches_directive& operator= (matches_directive const&)); + BOOST_DELETED_FUNCTION(matches_directive& operator= (matches_directive const&)) }; /////////////////////////////////////////////////////////////////////////// diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/no_case.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/no_case.hpp index 1bd8b62a79..d961dbca9f 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/no_case.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/no_case.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_NO_CASE_OCTOBER_25_2008_0424PM) -#define SPIRIT_NO_CASE_OCTOBER_25_2008_0424PM +#ifndef BOOST_SPIRIT_QI_DIRECTIVE_NO_CASE_HPP +#define BOOST_SPIRIT_QI_DIRECTIVE_NO_CASE_HPP #if defined(_MSC_VER) #pragma once diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/no_skip.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/no_skip.hpp index 119b0c80c3..0f35d46f49 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/no_skip.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/no_skip.hpp @@ -5,8 +5,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_NO_SKIP_JAN_16_2010_0802PM) -#define SPIRIT_NO_SKIP_JAN_16_2010_0802PM +#ifndef BOOST_SPIRIT_QI_DIRECTIVE_NO_SKIP_HPP +#define BOOST_SPIRIT_QI_DIRECTIVE_NO_SKIP_HPP #if defined(_MSC_VER) #pragma once diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/omit.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/omit.hpp index 2463507e8a..0d3c686128 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/omit.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/omit.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_OMIT_MARCH_24_2007_0802AM) -#define SPIRIT_OMIT_MARCH_24_2007_0802AM +#ifndef BOOST_SPIRIT_QI_DIRECTIVE_OMIT_HPP +#define BOOST_SPIRIT_QI_DIRECTIVE_OMIT_HPP #if defined(_MSC_VER) #pragma once @@ -71,7 +71,7 @@ namespace boost { namespace spirit { namespace qi Subject subject; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(omit_directive& operator= (omit_directive const&)); + BOOST_DELETED_FUNCTION(omit_directive& operator= (omit_directive const&)) omit_directive(const omit_directive&) = default; }; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/raw.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/raw.hpp index e1d208e759..f93b6ce8ea 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/raw.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/raw.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_RAW_APRIL_9_2007_0912AM) -#define SPIRIT_RAW_APRIL_9_2007_0912AM +#ifndef BOOST_SPIRIT_QI_DIRECTIVE_RAW_HPP +#define BOOST_SPIRIT_QI_DIRECTIVE_RAW_HPP #if defined(_MSC_VER) #pragma once @@ -21,7 +21,7 @@ #include <boost/spirit/home/support/unused.hpp> #include <boost/spirit/home/support/has_semantic_action.hpp> #include <boost/spirit/home/support/handles_container.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/iterator_range_core.hpp> // TODO: use forward include namespace boost { namespace spirit { @@ -105,7 +105,7 @@ namespace boost { namespace spirit { namespace traits , typename Iterator> struct handles_container<qi::raw_directive<Subject>, Attribute , Context, Iterator> - : unary_handles_container<Subject, Attribute, Context, Iterator> {}; + : mpl::true_ {}; }}} #endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/repeat.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/repeat.hpp index 577bd7619c..07e262c5f7 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/repeat.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/repeat.hpp @@ -5,8 +5,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_REPEAT_NOVEMBER_14_2008_1148AM) -#define SPIRIT_REPEAT_NOVEMBER_14_2008_1148AM +#ifndef BOOST_SPIRIT_QI_DIRECTIVE_REPEAT_HPP +#define BOOST_SPIRIT_QI_DIRECTIVE_REPEAT_HPP #if defined(_MSC_VER) #pragma once @@ -92,7 +92,7 @@ namespace boost { namespace spirit { namespace qi T const exact; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(exact_iterator& operator= (exact_iterator const&)); + BOOST_DELETED_FUNCTION(exact_iterator& operator= (exact_iterator const&)) exact_iterator(const exact_iterator&) = default; }; @@ -112,7 +112,7 @@ namespace boost { namespace spirit { namespace qi T const max; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(finite_iterator& operator= (finite_iterator const&)); + BOOST_DELETED_FUNCTION(finite_iterator& operator= (finite_iterator const&)) finite_iterator(const finite_iterator&) = default; }; @@ -130,7 +130,7 @@ namespace boost { namespace spirit { namespace qi T const min; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(infinite_iterator& operator= (infinite_iterator const&)); + BOOST_DELETED_FUNCTION(infinite_iterator& operator= (infinite_iterator const&)) }; template <typename Subject, typename LoopIter> @@ -209,7 +209,7 @@ namespace boost { namespace spirit { namespace qi LoopIter iter; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(repeat_parser& operator= (repeat_parser const&)); + BOOST_DELETED_FUNCTION(repeat_parser& operator= (repeat_parser const&)) repeat_parser(const repeat_parser&) = default; }; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/skip.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/skip.hpp index 6cc6f77454..55f114d226 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/skip.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/directive/skip.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_SKIP_JANUARY_26_2008_0422PM) -#define SPIRIT_SKIP_JANUARY_26_2008_0422PM +#ifndef BOOST_SPIRIT_QI_DIRECTIVE_SKIP_HPP +#define BOOST_SPIRIT_QI_DIRECTIVE_SKIP_HPP #if defined(_MSC_VER) #pragma once diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/meta_compiler.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/meta_compiler.hpp index 68649c0f04..afebaa3e37 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/meta_compiler.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/meta_compiler.hpp @@ -15,6 +15,7 @@ #include <boost/spirit/home/qi/domain.hpp> #include <boost/spirit/home/qi/parser.hpp> #include <boost/spirit/home/support/string_traits.hpp> +#include <boost/proto/tags.hpp> #include <boost/type_traits/remove_reference.hpp> #include <boost/utility/enable_if.hpp> #include <boost/fusion/include/at.hpp> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/nonterminal/grammar.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/nonterminal/grammar.hpp index d41590cab9..ac91acf309 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/nonterminal/grammar.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/nonterminal/grammar.hpp @@ -19,6 +19,8 @@ #include <boost/spirit/home/qi/nonterminal/nonterminal_fwd.hpp> #include <boost/spirit/home/qi/reference.hpp> #include <boost/noncopyable.hpp> +#include <boost/proto/extends.hpp> +#include <boost/proto/traits.hpp> #include <boost/type_traits/is_same.hpp> namespace boost { namespace spirit { namespace qi diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/nonterminal/rule.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/nonterminal/rule.hpp index 0901420312..60a2b1c64c 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/nonterminal/rule.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/nonterminal/rule.hpp @@ -12,10 +12,11 @@ #endif #include <boost/assert.hpp> +#include <boost/static_assert.hpp> #include <boost/config.hpp> #include <boost/function.hpp> #include <boost/mpl/vector.hpp> -#include <boost/type_traits/add_reference.hpp> +#include <boost/type_traits/is_convertible.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/fusion/include/vector.hpp> @@ -38,6 +39,10 @@ #include <boost/spirit/home/qi/nonterminal/nonterminal_fwd.hpp> #include <boost/spirit/home/qi/skip_over.hpp> +#include <boost/proto/extends.hpp> +#include <boost/proto/traits.hpp> +#include <boost/type_traits/is_reference.hpp> + #if defined(BOOST_MSVC) # pragma warning(push) # pragma warning(disable: 4355) // 'this' : used in base member initializer list warning @@ -125,7 +130,10 @@ namespace boost { namespace spirit { namespace qi typedef typename spirit::detail::attr_from_sig<sig_type>::type attr_type; - typedef typename add_reference<attr_type>::type attr_reference_type; + BOOST_STATIC_ASSERT_MSG( + !is_reference<attr_type>::value, + "Reference qualifier on Qi rule attribute is meaningless"); + typedef attr_type& attr_reference_type; // parameter_types is a sequence of types passed as parameters to the rule typedef typename @@ -275,22 +283,27 @@ namespace boost { namespace spirit { namespace qi , Context& /*context*/, Skipper const& skipper , Attribute& attr_param) const { + BOOST_STATIC_ASSERT_MSG((is_same<skipper_type, unused_type>::value || + !is_same<Skipper, unused_type>::value), + "The rule was instantiated with a skipper type but you have not pass any. " + "Did you use `parse` instead of `phrase_parse`?"); + BOOST_STATIC_ASSERT_MSG( + (is_convertible<Skipper const&, skipper_type>::value), + "The passed skipper is not compatible/convertible to one " + "that the rule was instantiated with"); if (f) { // do a preskip if this is an implied lexeme if (is_same<skipper_type, unused_type>::value) qi::skip_over(first, last, skipper); - typedef traits::make_attribute<attr_type, Attribute> make_attribute; - // do down-stream transformation, provides attribute for // rhs parser typedef traits::transform_attribute< - typename make_attribute::type, attr_type, domain> + Attribute, attr_type, domain> transform; - typename make_attribute::type made_attr = make_attribute::call(attr_param); - typename transform::type attr_ = transform::pre(made_attr); + typename transform::type attr_ = transform::pre(attr_param); // If you are seeing a compilation error here, you are probably // trying to use a rule or a grammar which has inherited @@ -305,12 +318,12 @@ namespace boost { namespace spirit { namespace qi { // do up-stream transformation, this integrates the results // back into the original attribute value, if appropriate - traits::post_transform(attr_param, attr_); + transform::post(attr_param, attr_); return true; } // inform attribute transformation of failed rhs - traits::fail_transform(attr_param, attr_); + transform::fail(attr_param); } return false; } @@ -321,22 +334,27 @@ namespace boost { namespace spirit { namespace qi , Context& caller_context, Skipper const& skipper , Attribute& attr_param, Params const& params) const { + BOOST_STATIC_ASSERT_MSG((is_same<skipper_type, unused_type>::value || + !is_same<Skipper, unused_type>::value), + "The rule was instantiated with a skipper type but you have not pass any. " + "Did you use `parse` instead of `phrase_parse`?"); + BOOST_STATIC_ASSERT_MSG( + (is_convertible<Skipper const&, skipper_type>::value), + "The passed skipper is not compatible/convertible to one " + "that the rule was instantiated with"); if (f) { // do a preskip if this is an implied lexeme if (is_same<skipper_type, unused_type>::value) qi::skip_over(first, last, skipper); - typedef traits::make_attribute<attr_type, Attribute> make_attribute; - // do down-stream transformation, provides attribute for // rhs parser typedef traits::transform_attribute< - typename make_attribute::type, attr_type, domain> + Attribute, attr_type, domain> transform; - typename make_attribute::type made_attr = make_attribute::call(attr_param); - typename transform::type attr_ = transform::pre(made_attr); + typename transform::type attr_ = transform::pre(attr_param); // If you are seeing a compilation error here, you are probably // trying to use a rule or a grammar which has inherited @@ -351,12 +369,12 @@ namespace boost { namespace spirit { namespace qi { // do up-stream transformation, this integrates the results // back into the original attribute value, if appropriate - traits::post_transform(attr_param, attr_); + transform::post(attr_param, attr_); return true; } // inform attribute transformation of failed rhs - traits::fail_transform(attr_param, attr_); + transform::fail(attr_param); } return false; } diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/bool.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/bool.hpp index 74e1343918..c270184887 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/bool.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/bool.hpp @@ -5,8 +5,8 @@ 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) ==============================================================================*/ -#if !defined(SPIRIT_QI_BOOL_SEP_29_2009_0709AM) -#define SPIRIT_QI_BOOL_SEP_29_2009_0709AM +#ifndef BOOST_SPIRIT_QI_NUMERIC_BOOL_HPP +#define BOOST_SPIRIT_QI_NUMERIC_BOOL_HPP #if defined(_MSC_VER) #pragma once @@ -128,7 +128,7 @@ namespace boost { namespace spirit { namespace qi return false; #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600)) - p; // suppresses warning: C4100: 'p' : unreferenced formal parameter + (void)p; // suppresses warning: C4100: 'p' : unreferenced formal parameter #endif return (allow_true && p.parse_true(first, last, attr)) || (!disallow_false && p.parse_false(first, last, attr)); diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/bool_policies.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/bool_policies.hpp index 62641a6036..a220e1e908 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/bool_policies.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/bool_policies.hpp @@ -4,8 +4,8 @@ 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) ==============================================================================*/ -#if !defined(SPIRIT_QI_BOOL_POLICIES_SEP_29_2009_0710AM) -#define SPIRIT_QI_BOOL_POLICIES_SEP_29_2009_0710AM +#ifndef BOOST_SPIRIT_QI_NUMERIC_BOOL_POLICIES_HPP +#define BOOST_SPIRIT_QI_NUMERIC_BOOL_POLICIES_HPP #if defined(_MSC_VER) #pragma once diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp index f1154dc92a..c17519c6f2 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp @@ -8,14 +8,13 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_NUMERIC_UTILS_APRIL_17_2006_0816AM) -#define SPIRIT_NUMERIC_UTILS_APRIL_17_2006_0816AM +#ifndef BOOST_SPIRIT_QI_NUMERIC_DETAIL_NUMERIC_UTILS_HPP +#define BOOST_SPIRIT_QI_NUMERIC_DETAIL_NUMERIC_UTILS_HPP #if defined(_MSC_VER) #pragma once #endif -#include <boost/detail/iterator.hpp> #include <boost/spirit/home/support/unused.hpp> #include <boost/spirit/home/qi/detail/attributes.hpp> #include <boost/spirit/home/support/char_encoding/ascii.hpp> @@ -31,7 +30,8 @@ #include <boost/mpl/bool.hpp> #include <boost/mpl/and.hpp> #include <boost/limits.hpp> -#include <boost/integer_traits.hpp> +#include <boost/static_assert.hpp> +#include <iterator> // for std::iterator_traits #if defined(BOOST_MSVC) # pragma warning(push) @@ -56,6 +56,9 @@ namespace boost { namespace spirit { namespace qi { namespace detail template <typename T, unsigned Radix> struct digits_traits; + template <int Digits, unsigned Radix> + struct digits2_to_n; + // lookup table for log2(x) : 2 <= x <= 36 #define BOOST_SPIRIT_LOG2 (#error)(#error) \ (1000000)(1584960)(2000000)(2321920)(2584960)(2807350) \ @@ -67,11 +70,10 @@ namespace boost { namespace spirit { namespace qi { namespace detail /***/ #define BOOST_PP_LOCAL_MACRO(Radix) \ - template <typename T> struct digits_traits<T, Radix> \ + template <int Digits> struct digits2_to_n<Digits, Radix> \ { \ - typedef std::numeric_limits<T> numeric_limits_type; \ BOOST_STATIC_CONSTANT(int, value = static_cast<int>( \ - (numeric_limits_type::digits * 1000000) / \ + (Digits * 1000000) / \ BOOST_PP_SEQ_ELEM(Radix, BOOST_SPIRIT_LOG2))); \ }; \ /***/ @@ -81,6 +83,18 @@ namespace boost { namespace spirit { namespace qi { namespace detail #undef BOOST_SPIRIT_LOG2 + template <typename T, unsigned Radix> + struct digits_traits : digits2_to_n<std::numeric_limits<T>::digits, Radix> + { + BOOST_STATIC_ASSERT(std::numeric_limits<T>::radix == 2); + }; + + template <typename T> + struct digits_traits<T, 10> + { + static int const value = std::numeric_limits<T>::digits10; + }; + /////////////////////////////////////////////////////////////////////////// // // Traits class for radix specific number conversion @@ -114,12 +128,6 @@ namespace boost { namespace spirit { namespace qi { namespace detail return spirit::char_encoding::ascii::tolower(ch) - 'a' + 10; } }; - - template <typename T, T Val> - struct constexpr_int - { - BOOST_STATIC_CONSTEXPR T value = Val; - }; /////////////////////////////////////////////////////////////////////////// // positive_accumulator/negative_accumulator: Accumulator policies for @@ -140,20 +148,20 @@ namespace boost { namespace spirit { namespace qi { namespace detail inline static bool add(T& n, Char ch, mpl::true_) // checked add { // Ensure n *= Radix will not overflow - typedef constexpr_int<T, boost::integer_traits<T>::const_max> max; - typedef constexpr_int<T, max::value / Radix> val; + T const max = (std::numeric_limits<T>::max)(); + T const val = max / Radix; - if (n > val::value) + if (n > val) return false; - n *= Radix; + T tmp = n * Radix; // Ensure n += digit will not overflow const int digit = radix_traits<Radix>::digit(ch); - if (n > max::value - digit) + if (tmp > max - digit) return false; - n += static_cast<T>(digit); + n = tmp + static_cast<T>(digit); return true; } }; @@ -172,20 +180,20 @@ namespace boost { namespace spirit { namespace qi { namespace detail inline static bool add(T& n, Char ch, mpl::true_) // checked subtract { // Ensure n *= Radix will not underflow - typedef constexpr_int<T, boost::integer_traits<T>::const_min> min; - typedef constexpr_int<T, (min::value + 1) / T(Radix)> val; + T const min = (std::numeric_limits<T>::min)(); + T const val = min / T(Radix); - if (n < val::value) + if (n < val) return false; - n *= Radix; + T tmp = n * Radix; // Ensure n -= digit will not underflow int const digit = radix_traits<Radix>::digit(ch); - if (n < min::value + digit) + if (tmp < min + digit) return false; - n -= static_cast<T>(digit); + n = tmp - static_cast<T>(digit); return true; } }; @@ -200,9 +208,9 @@ namespace boost { namespace spirit { namespace qi { namespace detail inline static bool call(Char ch, std::size_t count, T& n, mpl::true_) { - typedef constexpr_int<std::size_t, digits_traits<T, Radix>::value - 1> overflow_free; + std::size_t const overflow_free = digits_traits<T, Radix>::value - 1; - if (!AlwaysCheckOverflow && (count < overflow_free::value)) + if (!AlwaysCheckOverflow && (count < overflow_free)) { Accumulator::add(n, ch, mpl::false_()); } @@ -318,9 +326,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail { typedef radix_traits<Radix> radix_check; typedef int_extractor<Radix, Accumulator, MaxDigits, Accumulate> extractor; - typedef typename - boost::detail::iterator_traits<Iterator>::value_type - char_type; + typedef typename std::iterator_traits<Iterator>::value_type char_type; Iterator it = first; std::size_t leading_zeros = 0; @@ -423,9 +429,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail { typedef radix_traits<Radix> radix_check; typedef int_extractor<Radix, Accumulator, -1, Accumulate> extractor; - typedef typename - boost::detail::iterator_traits<Iterator>::value_type - char_type; + typedef typename std::iterator_traits<Iterator>::value_type char_type; Iterator it = first; std::size_t count = 0; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp index c8d20876fa..7ac106721c 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp @@ -1,13 +1,13 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2019 Joel de Guzman Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ 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) =============================================================================*/ -#if !defined(SPIRIT_REAL_IMPL_APRIL_18_2006_0901AM) -#define SPIRIT_REAL_IMPL_APRIL_18_2006_0901AM +#ifndef BOOST_SPIRIT_QI_NUMERIC_DETAIL_REAL_IMPL_HPP +#define BOOST_SPIRIT_QI_NUMERIC_DETAIL_REAL_IMPL_HPP #if defined(_MSC_VER) #pragma once @@ -19,10 +19,11 @@ #include <boost/spirit/home/support/unused.hpp> #include <boost/spirit/home/qi/detail/attributes.hpp> #include <boost/spirit/home/support/detail/pow10.hpp> -#include <boost/spirit/home/support/detail/sign.hpp> #include <boost/integer.hpp> #include <boost/assert.hpp> +#include <boost/core/cmath.hpp> + #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) # pragma warning(push) # pragma warning(disable: 4100) // 'p': unreferenced formal parameter @@ -65,11 +66,11 @@ namespace boost { namespace spirit { namespace traits { if (exp >= 0) { - int max_exp = std::numeric_limits<T>::max_exponent10; + int const max_exp = std::numeric_limits<T>::max_exponent10; // return false if exp exceeds the max_exp // do this check only for primitive types! - if (is_floating_point<T>() && exp > max_exp) + if (is_floating_point<T>() && (exp > max_exp)) return false; n = acc_n * pow10<T>(exp); } @@ -77,7 +78,7 @@ namespace boost { namespace spirit { namespace traits { if (exp < std::numeric_limits<T>::min_exponent10) { - int min_exp = std::numeric_limits<T>::min_exponent10; + int const min_exp = std::numeric_limits<T>::min_exponent10; detail::compensate_roundoff(n, acc_n); n /= pow10<T>(-min_exp); @@ -121,19 +122,19 @@ namespace boost { namespace spirit { namespace traits inline float negate(bool neg, float n) { - return neg ? spirit::detail::changesign(n) : n; + return neg ? (core::copysign)(n, -1.f) : n; } inline double negate(bool neg, double n) { - return neg ? spirit::detail::changesign(n) : n; + return neg ? (core::copysign)(n, -1.) : n; } inline long double negate(bool neg, long double n) { - return neg ? spirit::detail::changesign(n) : n; + return neg ? (core::copysign)(n, static_cast<long double>(-1)) : n; } template <typename T> @@ -151,20 +152,6 @@ namespace boost { namespace spirit { namespace traits } template <typename T> - inline bool - is_equal_to_one(T const& value) - { - return value == 1.0; - } - - inline bool - is_equal_to_one(unused_type) - { - // no-op for unused_type - return false; - } - - template <typename T> struct real_accumulator : mpl::identity<T> {}; template <> @@ -178,9 +165,33 @@ namespace boost { namespace spirit { namespace traits namespace boost { namespace spirit { namespace qi { namespace detail { + BOOST_MPL_HAS_XXX_TRAIT_DEF(version) + template <typename T, typename RealPolicies> struct real_impl { + template <typename Iterator> + static std::size_t + ignore_excess_digits(Iterator& /* first */, Iterator const& /* last */, mpl::false_) + { + return 0; + } + + template <typename Iterator> + static std::size_t + ignore_excess_digits(Iterator& first, Iterator const& last, mpl::true_) + { + return RealPolicies::ignore_excess_digits(first, last); + } + + template <typename Iterator> + static std::size_t + ignore_excess_digits(Iterator& first, Iterator const& last) + { + typedef mpl::bool_<has_version<RealPolicies>::value> has_version; + return ignore_excess_digits(first, last, has_version()); + } + template <typename Iterator, typename Attribute> static bool parse(Iterator& first, Iterator const& last, Attribute& attr, @@ -199,6 +210,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail typename traits::real_accumulator<T>::type acc_n = 0; bool got_a_number = p.parse_n(first, last, acc_n); + int excess_n = 0; // If we did not get a number it might be a NaN, Inf or a leading // dot. @@ -221,6 +233,12 @@ namespace boost { namespace spirit { namespace qi { namespace detail return false; } } + else + { + // We got a number and we still see digits. This happens if acc_n (an integer) + // exceeds the integer's capacity. Collect the excess digits. + excess_n = static_cast<int>(ignore_excess_digits(first, last)); + } bool e_hit = false; Iterator e_pos; @@ -232,7 +250,12 @@ namespace boost { namespace spirit { namespace qi { namespace detail // We got the decimal point. Now we will try to parse // the fraction if it is there. If not, it defaults // to zero (0) only if we already got a number. - if (p.parse_frac_n(first, last, acc_n, frac_digits)) + if (excess_n != 0) + { + // We skip the fractions if we already exceeded our digits capacity + ignore_excess_digits(first, last); + } + else if (p.parse_frac_n(first, last, acc_n, frac_digits)) { BOOST_ASSERT(frac_digits >= 0); } @@ -277,8 +300,8 @@ namespace boost { namespace spirit { namespace qi { namespace detail if (p.parse_exp_n(first, last, exp)) { // Got the exponent value. Scale the number by - // exp-frac_digits. - if (!traits::scale(exp, frac_digits, n, acc_n)) + // exp + excess_n - frac_digits. + if (!traits::scale(exp + excess_n, frac_digits, n, acc_n)) return false; } else @@ -297,25 +320,17 @@ namespace boost { namespace spirit { namespace qi { namespace detail bool r = traits::scale(-frac_digits, n, acc_n); BOOST_VERIFY(r); } - else if (traits::is_equal_to_one(acc_n)) + else { - // There is a chance of having to parse one of the 1.0#... - // styles some implementations use for representing NaN or Inf. - - // Check whether the number to parse is a NaN or Inf - if (p.parse_nan(first, last, n) || - p.parse_inf(first, last, n)) + if (excess_n) { - // If we got a negative sign, negate the number - traits::assign_to(traits::negate(neg, n), attr); - return true; // got a NaN or Inf, return immediately + if (!traits::scale(excess_n, n, acc_n)) + return false; + } + else + { + n = static_cast<T>(acc_n); } - - n = static_cast<T>(acc_n); - } - else - { - n = static_cast<T>(acc_n); } // If we got a negative sign, negate the number diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/real_policies.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/real_policies.hpp index d73a9dce8a..05ce9f6cf3 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/real_policies.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/real_policies.hpp @@ -1,12 +1,12 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2019 Joel de Guzman Copyright (c) 2001-2011 Hartmut Kaiser 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) ==============================================================================*/ -#if !defined(SPIRIT_REAL_POLICIES_APRIL_17_2006_1158PM) -#define SPIRIT_REAL_POLICIES_APRIL_17_2006_1158PM +#ifndef BOOST_SPIRIT_QI_NUMERIC_REAL_POLICIES_HPP +#define BOOST_SPIRIT_QI_NUMERIC_REAL_POLICIES_HPP #if defined(_MSC_VER) #pragma once @@ -14,6 +14,29 @@ #include <boost/spirit/home/qi/numeric/numeric_utils.hpp> #include <boost/spirit/home/qi/detail/string_parse.hpp> +#include <boost/type_traits/is_floating_point.hpp> + +namespace boost { namespace spirit { namespace traits +{ + // So that we won't exceed the capacity of the underlying type T, + // we limit the number of digits parsed to its max_digits10. + // By default, the value is -1 which tells spirit to parse an + // unbounded number of digits. + + template <typename T, typename Enable = void> + struct max_digits10 + { + static int const value = -1; // unbounded + }; + + template <typename T> + struct max_digits10<T + , typename enable_if_c<(is_floating_point<T>::value)>::type> + { + static int const digits = std::numeric_limits<T>::digits; + static int const value = 2 + (digits * 30103l) / 100000l; + }; +}}} namespace boost { namespace spirit { namespace qi { @@ -23,6 +46,9 @@ namespace boost { namespace spirit { namespace qi template <typename T> struct ureal_policies { + // Versioning + typedef mpl::int_<2> version; + // trailing dot policy suggested by Gustavo Guerra static bool const allow_leading_dot = true; static bool const allow_trailing_dot = true; @@ -39,7 +65,22 @@ namespace boost { namespace spirit { namespace qi static bool parse_n(Iterator& first, Iterator const& last, Attribute& attr_) { - return extract_uint<Attribute, 10, 1, -1>::call(first, last, attr_); + typedef extract_uint<Attribute, 10, 1 + , traits::max_digits10<T>::value // See notes on max_digits10 above + , false, true> + extract_uint; + return extract_uint::call(first, last, attr_); + } + + // ignore_excess_digits (required for version > 1 API) + template <typename Iterator> + static std::size_t + ignore_excess_digits(Iterator& first, Iterator const& last) + { + Iterator save = first; + if (extract_uint<unused_type, 10, 1, -1>::call(first, last, unused)) + return static_cast<std::size_t>(std::distance(save, first)); + return 0; } template <typename Iterator> @@ -60,11 +101,18 @@ namespace boost { namespace spirit { namespace qi bool r = extract_uint<Attribute, 10, 1, -1, true, true>::call(first, last, attr_); if (r) { +#if defined(_MSC_VER) && _MSC_VER < 1900 +# pragma warning(push) +# pragma warning(disable: 4127) // conditional expression is constant +#endif // Optimization note: don't compute frac_digits if T is // an unused_type. This should be optimized away by the compiler. if (!is_same<T, unused_type>::value) frac_digits = static_cast<int>(std::distance(savef, first)); +#if defined(_MSC_VER) && _MSC_VER < 1900 +# pragma warning(pop) +#endif // ignore extra (non-significant digits) extract_uint<unused_type, 10, 1, -1>::call(first, last, unused); } @@ -89,22 +137,9 @@ namespace boost { namespace spirit { namespace qi } /////////////////////////////////////////////////////////////////////// - // The parse_nan() and parse_inf() functions get called whenever: - // - // - a number to parse does not start with a digit (after having - // successfully parsed an optional sign) - // - // or - // - // - after a floating point number of the value 1 (having no - // exponential part and a fractional part value of 0) has been - // parsed. - // - // The first call allows to recognize representations of NaN or Inf - // starting with a non-digit character (such as NaN, Inf, QNaN etc.). - // - // The second call allows to recognize representation formats starting - // with a 1.0 (such as 1.0#NAN or 1.0#INF etc.). + // The parse_nan() and parse_inf() functions get called whenever + // a number to parse does not start with a digit (after having + // successfully parsed an optional sign). // // The functions should return true if a Nan or Inf has been found. In // this case the attr should be set to the matched value (NaN or diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/uint.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/uint.hpp index f6d1efde37..258ea70c43 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/uint.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/numeric/uint.hpp @@ -6,8 +6,8 @@ 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) ==============================================================================*/ -#if !defined(SPIRIT_UINT_APR_17_2006_0901AM) -#define SPIRIT_UINT_APR_17_2006_0901AM +#ifndef BOOST_SPIRIT_QI_NUMERIC_UINT_HPP +#define BOOST_SPIRIT_QI_NUMERIC_UINT_HPP #if defined(_MSC_VER) #pragma once diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/alternative.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/alternative.hpp index 22cfdeff56..7814752dbe 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/alternative.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/alternative.hpp @@ -5,8 +5,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_ALTERNATIVE_FEBRUARY_05_2007_1153AM) -#define SPIRIT_ALTERNATIVE_FEBRUARY_05_2007_1153AM +#ifndef BOOST_SPIRIT_QI_OPERATOR_ALTERNATIVE_HPP +#define BOOST_SPIRIT_QI_OPERATOR_ALTERNATIVE_HPP #if defined(_MSC_VER) #pragma once @@ -24,6 +24,8 @@ #include <boost/fusion/include/any.hpp> #include <boost/fusion/include/mpl.hpp> #include <boost/fusion/include/for_each.hpp> +#include <boost/proto/operators.hpp> +#include <boost/proto/tags.hpp> namespace boost { namespace spirit { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/and_predicate.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/and_predicate.hpp index 0554c10d6d..647fdd2e95 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/and_predicate.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/and_predicate.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_AND_PREDICATE_MARCH_23_2007_0617PM) -#define SPIRIT_AND_PREDICATE_MARCH_23_2007_0617PM +#ifndef BOOST_SPIRIT_QI_OPERATOR_AND_PREDICATE_HPP +#define BOOST_SPIRIT_QI_OPERATOR_AND_PREDICATE_HPP #if defined(_MSC_VER) #pragma once @@ -19,6 +19,8 @@ #include <boost/spirit/home/support/has_semantic_action.hpp> #include <boost/spirit/home/support/handles_container.hpp> #include <boost/fusion/include/at.hpp> +#include <boost/proto/operators.hpp> +#include <boost/proto/tags.hpp> namespace boost { namespace spirit { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/difference.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/difference.hpp index f703d7f9e5..7dc16f612f 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/difference.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/difference.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_DIFFERENCE_FEBRUARY_11_2007_1250PM) -#define SPIRIT_DIFFERENCE_FEBRUARY_11_2007_1250PM +#ifndef BOOST_SPIRIT_QI_OPERATOR_DIFFERENCE_HPP +#define BOOST_SPIRIT_QI_OPERATOR_DIFFERENCE_HPP #if defined(_MSC_VER) #pragma once @@ -19,6 +19,8 @@ #include <boost/spirit/home/support/has_semantic_action.hpp> #include <boost/spirit/home/support/handles_container.hpp> #include <boost/fusion/include/at.hpp> +#include <boost/proto/operators.hpp> +#include <boost/proto/tags.hpp> namespace boost { namespace spirit { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/expect.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/expect.hpp index 540372c33f..aa2462fc7d 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/expect.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/expect.hpp @@ -5,8 +5,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_EXPECT_APRIL_29_2007_0445PM) -#define SPIRIT_EXPECT_APRIL_29_2007_0445PM +#ifndef BOOST_SPIRIT_QI_OPERATOR_EXPECT_HPP +#define BOOST_SPIRIT_QI_OPERATOR_EXPECT_HPP #if defined(_MSC_VER) #pragma once @@ -19,6 +19,8 @@ #include <boost/spirit/home/support/has_semantic_action.hpp> #include <boost/spirit/home/support/handles_container.hpp> #include <boost/spirit/home/support/info.hpp> +#include <boost/proto/operators.hpp> +#include <boost/proto/tags.hpp> namespace boost { namespace spirit { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/kleene.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/kleene.hpp index 798e63d675..7b32515f8b 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/kleene.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/kleene.hpp @@ -5,8 +5,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_KLEENE_JANUARY_07_2007_0818AM) -#define SPIRIT_KLEENE_JANUARY_07_2007_0818AM +#ifndef BOOST_SPIRIT_QI_OPERATOR_KLEENE_HPP +#define BOOST_SPIRIT_QI_OPERATOR_KLEENE_HPP #if defined(_MSC_VER) #pragma once @@ -21,6 +21,8 @@ #include <boost/spirit/home/support/has_semantic_action.hpp> #include <boost/spirit/home/support/handles_container.hpp> #include <boost/spirit/home/support/info.hpp> +#include <boost/proto/operators.hpp> +#include <boost/proto/tags.hpp> namespace boost { namespace spirit { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/list.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/list.hpp index c5b3ef6cd3..cd5bbb6a61 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/list.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/list.hpp @@ -5,8 +5,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_LIST_MARCH_24_2007_1031AM) -#define SPIRIT_LIST_MARCH_24_2007_1031AM +#ifndef BOOST_SPIRIT_QI_OPERATOR_LIST_HPP +#define BOOST_SPIRIT_QI_OPERATOR_LIST_HPP #if defined(_MSC_VER) #pragma once @@ -21,6 +21,8 @@ #include <boost/spirit/home/support/has_semantic_action.hpp> #include <boost/spirit/home/support/handles_container.hpp> #include <boost/spirit/home/support/info.hpp> +#include <boost/proto/operators.hpp> +#include <boost/proto/tags.hpp> #include <vector> namespace boost { namespace spirit diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/not_predicate.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/not_predicate.hpp index 1fb81cd6e0..9c2ef74ebc 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/not_predicate.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/not_predicate.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_NOT_PREDICATE_MARCH_23_2007_0618PM) -#define SPIRIT_NOT_PREDICATE_MARCH_23_2007_0618PM +#ifndef BOOST_SPIRIT_QI_OPERATOR_NOT_PREDICATE_HPP +#define BOOST_SPIRIT_QI_OPERATOR_NOT_PREDICATE_HPP #if defined(_MSC_VER) #pragma once @@ -18,6 +18,8 @@ #include <boost/spirit/home/support/has_semantic_action.hpp> #include <boost/spirit/home/support/handles_container.hpp> #include <boost/spirit/home/support/info.hpp> +#include <boost/proto/operators.hpp> +#include <boost/proto/tags.hpp> namespace boost { namespace spirit { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/optional.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/optional.hpp index 0f7698de72..b5605b2889 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/optional.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/optional.hpp @@ -5,8 +5,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_OPTIONAL_MARCH_23_2007_1117PM) -#define SPIRIT_OPTIONAL_MARCH_23_2007_1117PM +#ifndef BOOST_SPIRIT_QI_OPERATOR_OPTIONAL_HPP +#define BOOST_SPIRIT_QI_OPERATOR_OPTIONAL_HPP #if defined(_MSC_VER) #pragma once @@ -22,6 +22,8 @@ #include <boost/spirit/home/qi/meta_compiler.hpp> #include <boost/spirit/home/qi/detail/assign_to.hpp> #include <boost/optional.hpp> +#include <boost/proto/operators.hpp> +#include <boost/proto/tags.hpp> #include <vector> namespace boost { namespace spirit diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/permutation.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/permutation.hpp index 0934f74256..add503b875 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/permutation.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/permutation.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_PERMUTATION_OR_MARCH_13_2007_1145PM) -#define SPIRIT_PERMUTATION_OR_MARCH_13_2007_1145PM +#ifndef BOOST_SPIRIT_QI_OPERATOR_PERMUTATION_HPP +#define BOOST_SPIRIT_QI_OPERATOR_PERMUTATION_HPP #if defined(_MSC_VER) #pragma once @@ -22,6 +22,8 @@ #include <boost/fusion/include/size.hpp> #include <boost/optional.hpp> #include <boost/array.hpp> +#include <boost/proto/operators.hpp> +#include <boost/proto/tags.hpp> namespace boost { namespace spirit { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/plus.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/plus.hpp index 3c08d1fabe..fc4632b3e0 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/plus.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/plus.hpp @@ -5,8 +5,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_PLUS_MARCH_13_2007_0127PM) -#define SPIRIT_PLUS_MARCH_13_2007_0127PM +#ifndef BOOST_SPIRIT_QI_OPERATOR_PLUS_HPP +#define BOOST_SPIRIT_QI_OPERATOR_PLUS_HPP #if defined(_MSC_VER) #pragma once @@ -21,6 +21,8 @@ #include <boost/spirit/home/support/has_semantic_action.hpp> #include <boost/spirit/home/support/handles_container.hpp> #include <boost/spirit/home/support/info.hpp> +#include <boost/proto/operators.hpp> +#include <boost/proto/tags.hpp> namespace boost { namespace spirit { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/sequence.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/sequence.hpp index 817b7dc7c8..3854c9e3ca 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/sequence.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/sequence.hpp @@ -5,8 +5,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_SEQUENCE_APR_22_2006_0811AM) -#define SPIRIT_SEQUENCE_APR_22_2006_0811AM +#ifndef BOOST_SPIRIT_QI_OPERATOR_SEQUENCE_HPP +#define BOOST_SPIRIT_QI_OPERATOR_SEQUENCE_HPP #if defined(_MSC_VER) #pragma once @@ -15,6 +15,8 @@ #include <boost/spirit/home/qi/operator/sequence_base.hpp> #include <boost/spirit/home/qi/detail/fail_function.hpp> #include <boost/spirit/home/qi/meta_compiler.hpp> +#include <boost/proto/operators.hpp> +#include <boost/proto/tags.hpp> namespace boost { namespace spirit { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/sequence_base.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/sequence_base.hpp index 366468602e..1b56e819e8 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/sequence_base.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/sequence_base.hpp @@ -5,8 +5,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_SEQUENCE_BASE_APRIL_22_2006_0811AM) -#define SPIRIT_SEQUENCE_BASE_APRIL_22_2006_0811AM +#ifndef BOOST_SPIRIT_QI_OPERATOR_SEQUENCE_BASE_HPP +#define BOOST_SPIRIT_QI_OPERATOR_SEQUENCE_BASE_HPP #if defined(_MSC_VER) #pragma once diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/sequential_or.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/sequential_or.hpp index 96ac64e5d2..1d47f5a0ae 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/sequential_or.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/operator/sequential_or.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_SEQUENTIAL_OR_MARCH_12_2007_1130PM) -#define SPIRIT_SEQUENTIAL_OR_MARCH_12_2007_1130PM +#ifndef BOOST_SPIRIT_QI_OPERATOR_SEQUENTIAL_OR_HPP +#define BOOST_SPIRIT_QI_OPERATOR_SEQUENTIAL_OR_HPP #if defined(_MSC_VER) #pragma once @@ -19,6 +19,8 @@ #include <boost/spirit/home/support/handles_container.hpp> #include <boost/fusion/include/as_vector.hpp> #include <boost/fusion/include/for_each.hpp> +#include <boost/proto/operators.hpp> +#include <boost/proto/tags.hpp> namespace boost { namespace spirit { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/skip_over.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/skip_over.hpp index f46b304404..f66a361112 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/skip_over.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/skip_over.hpp @@ -24,7 +24,7 @@ namespace boost { namespace spirit { namespace qi template <typename Iterator, typename T> inline void skip_over(Iterator& first, Iterator const& last, T const& skipper) { - while (first != last && skipper.parse(first, last, unused, unused, unused)) + while (skipper.parse(first, last, unused, unused, unused)) /***/; } diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/string/detail/tst.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/string/detail/tst.hpp index 4f551d289e..73f2528c80 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/string/detail/tst.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/string/detail/tst.hpp @@ -12,7 +12,8 @@ #endif #include <boost/call_traits.hpp> -#include <boost/detail/iterator.hpp> +#include <iterator> // for std::iterator_traits +#include <string> namespace boost { namespace spirit { namespace qi { namespace detail { @@ -74,7 +75,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail while (p && i != last) { typename - boost::detail::iterator_traits<Iterator>::value_type + std::iterator_traits<Iterator>::value_type c = filter(*i); // filter only the input if (c == p->id) @@ -118,7 +119,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail for(;;) { typename - boost::detail::iterator_traits<Iterator>::value_type + std::iterator_traits<Iterator>::value_type c = *first; if (*pp == 0) @@ -154,7 +155,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail return; typename - boost::detail::iterator_traits<Iterator>::value_type + std::iterator_traits<Iterator>::value_type c = *first; if (c == p->id) diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/string/lit.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/string/lit.hpp index dedc0d8bb9..5929e274d4 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/string/lit.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/string/lit.hpp @@ -119,7 +119,7 @@ namespace boost { namespace spirit { namespace qi String str; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(literal_string& operator= (literal_string const&)); + BOOST_DELETED_FUNCTION(literal_string& operator= (literal_string const&)) literal_string(const literal_string&) = default; }; @@ -138,7 +138,7 @@ namespace boost { namespace spirit { namespace qi , str_hi(in) { #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600)) - encoding; // suppresses warning: C4100: 'encoding' : unreferenced formal parameter + (void)encoding; // suppresses warning: C4100: 'encoding' : unreferenced formal parameter #endif typename string_type::iterator loi = str_lo.begin(); typename string_type::iterator hii = str_hi.begin(); diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/string/symbols.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/string/symbols.hpp index 91f6e7f3b4..39d58cb490 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/string/symbols.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/qi/string/symbols.hpp @@ -23,10 +23,10 @@ #include <boost/spirit/home/support/info.hpp> #include <boost/spirit/home/support/unused.hpp> #include <boost/spirit/home/support/string_traits.hpp> - -#include <boost/fusion/include/at.hpp> -#include <boost/range.hpp> -#include <boost/type_traits/add_reference.hpp> +#include <boost/proto/extends.hpp> +#include <boost/proto/traits.hpp> +#include <boost/range/begin.hpp> +#include <boost/range/end.hpp> #include <boost/shared_ptr.hpp> #if defined(BOOST_MSVC) @@ -324,7 +324,7 @@ public: symbols& sym; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(adder& operator= (adder const&)); + BOOST_DELETED_FUNCTION(adder& operator= (adder const&)) }; struct remover @@ -366,7 +366,7 @@ public: symbols& sym; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(remover& operator= (remover const&)); + BOOST_DELETED_FUNCTION(remover& operator= (remover const&)) }; adder add; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/action_dispatch.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/action_dispatch.hpp index c17f56dfb8..df72ef4ede 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/action_dispatch.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/action_dispatch.hpp @@ -22,9 +22,14 @@ #endif -#include <boost/spirit/include/phoenix_core.hpp> #include <boost/spirit/home/support/attributes.hpp> +namespace boost { namespace phoenix +{ + template <typename Expr> + struct actor; +}} + namespace boost { namespace spirit { namespace traits { template <typename Component> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/algorithm/any_if_ns.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/algorithm/any_if_ns.hpp index 9af0261ed3..6d618754b3 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/algorithm/any_if_ns.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/algorithm/any_if_ns.hpp @@ -48,7 +48,10 @@ namespace boost { namespace spirit any_if_ns(First1 const& first1, First2 const& first2 , Last1 const& last1, Last2 const& last2, F& f, mpl::false_) { - return (0 != (f(*first1, spirit::detail::attribute_value<Pred, First1, Last2>(first2)) | + typename result_of::attribute_value<First1, First2, Last2, Pred>::type + attribute = spirit::detail::attribute_value<Pred, First1, Last2>(first2); + + return (0 != (f(*first1, attribute) | detail::any_if_ns<Pred>( fusion::next(first1) , attribute_next<Pred, First1, Last2>(first2) diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/algorithm/any_if_ns_so.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/algorithm/any_if_ns_so.hpp index d0279cf037..43528921e8 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/algorithm/any_if_ns_so.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/algorithm/any_if_ns_so.hpp @@ -12,6 +12,7 @@ #pragma once #endif +#include <boost/spirit/home/support/algorithm/any_if.hpp> #include <boost/spirit/home/support/algorithm/any_ns_so.hpp> namespace boost { namespace spirit @@ -47,7 +48,10 @@ namespace boost { namespace spirit any_if_ns_so(First1 const& first1, First2 const& first2 , Last1 const& last1, Last2 const& last2, F& f, mpl::false_) { - bool head = f(*first1, spirit::detail::attribute_value<Pred, First1, Last2>(first2)); + typename result_of::attribute_value<First1, First2, Last2, Pred>::type + attribute = spirit::detail::attribute_value<Pred, First1, Last2>(first2); + + bool head = f(*first1, attribute); bool tail = detail::any_if_ns_so<Pred>( fusion::next(first1) diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/argument.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/argument.hpp index caeee0b46a..add245a0bc 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/argument.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/argument.hpp @@ -15,13 +15,17 @@ #include <boost/preprocessor/repetition/repeat_from_to.hpp> #include <boost/preprocessor/arithmetic/inc.hpp> -#include <boost/spirit/include/phoenix_core.hpp> #include <boost/spirit/home/support/assert_msg.hpp> #include <boost/spirit/home/support/limits.hpp> #include <boost/fusion/include/at.hpp> #include <boost/fusion/include/size.hpp> #include <boost/mpl/size.hpp> #include <boost/mpl/at.hpp> +#include <boost/phoenix/core/actor.hpp> +#include <boost/phoenix/core/argument.hpp> +#include <boost/phoenix/core/terminal.hpp> +#include <boost/phoenix/core/v2_eval.hpp> +#include <boost/proto/proto_fwd.hpp> // for transform placeholders #ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/attributes.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/attributes.hpp index ceba157fcf..9b53ba4e6a 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/attributes.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/attributes.hpp @@ -28,9 +28,9 @@ #include <boost/fusion/include/for_each.hpp> #include <boost/fusion/include/is_view.hpp> #include <boost/fusion/include/mpl.hpp> -#include <boost/utility/value_init.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/type_traits/is_convertible.hpp> +#include <boost/type_traits/is_reference.hpp> #include <boost/mpl/eval_if.hpp> #include <boost/mpl/end.hpp> #include <boost/mpl/find_if.hpp> @@ -40,11 +40,12 @@ #include <boost/mpl/or.hpp> #include <boost/mpl/has_xxx.hpp> #include <boost/mpl/equal.hpp> -#include <boost/proto/proto_fwd.hpp> +#include <boost/proto/traits.hpp> #include <boost/utility/enable_if.hpp> #include <boost/variant.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/range_fwd.hpp> #include <boost/config.hpp> +#include <iterator> // for std::iterator_traits, std::distance #include <vector> #include <utility> #include <ios> @@ -559,12 +560,12 @@ namespace boost { namespace spirit { namespace traits template <typename Iterator> struct attribute_size<iterator_range<Iterator> > { - typedef typename boost::detail::iterator_traits<Iterator>:: + typedef typename std::iterator_traits<Iterator>:: difference_type type; static type call(iterator_range<Iterator> const& r) { - return boost::detail::distance(r.begin(), r.end()); + return std::distance(r.begin(), r.end()); } }; @@ -923,6 +924,23 @@ namespace boost { namespace spirit { namespace traits type; }; + namespace detail { + // Domain-agnostic class template partial specializations and + // type agnostic domain partial specializations are ambious. + // To resolve the ambiguity type agnostic domain partial + // specializations are dispatched via intermediate type. + template <typename Exposed, typename Transformed, typename Domain> + struct transform_attribute_base; + + template <typename Attribute> + struct synthesize_attribute + { + typedef Attribute type; + static Attribute pre(unused_type) { return Attribute(); } + static void post(unused_type, Attribute const&) {} + static void fail(unused_type) {} + }; + } /////////////////////////////////////////////////////////////////////////// // transform_attribute // @@ -930,91 +948,32 @@ namespace boost { namespace spirit { namespace traits // attributes. This template can be used as a customization point, where // the user is able specify specific transformation rules for any attribute // type. + // + // Note: the transformations involving unused_type are internal details + // and may be subject to change at any time. + // /////////////////////////////////////////////////////////////////////////// template <typename Exposed, typename Transformed, typename Domain , typename Enable/* = void*/> - struct transform_attribute; - - /////////////////////////////////////////////////////////////////////////// - template <typename Domain, typename Transformed, typename Exposed> - typename spirit::result_of::pre_transform<Exposed, Transformed, Domain>::type - pre_transform(Exposed& attr BOOST_PROTO_DISABLE_IF_IS_CONST(Exposed)) + struct transform_attribute + : detail::transform_attribute_base<Exposed, Transformed, Domain> { - return transform_attribute<Exposed, Transformed, Domain>::pre(attr); - } - - template <typename Domain, typename Transformed, typename Exposed> - typename spirit::result_of::pre_transform<Exposed const, Transformed, Domain>::type - pre_transform(Exposed const& attr) - { - return transform_attribute<Exposed const, Transformed, Domain>::pre(attr); - } - - /////////////////////////////////////////////////////////////////////////// - // make_attribute - // - // All parsers and generators have specific attribute types. - // Spirit parsers and generators are passed an attribute; these are either - // references to the expected type, or an unused_type -- to flag that we do - // not care about the attribute. For semantic actions, however, we need to - // have a real value to pass to the semantic action. If the client did not - // provide one, we will have to synthesize the value. This class takes care - // of that. *Note that this behavior has changed. From Boost 1.47, semantic - // actions always take in the passed attribute as-is if the PP constant: - // BOOST_SPIRIT_ACTIONS_ALLOW_ATTR_COMPAT is defined. - /////////////////////////////////////////////////////////////////////////// - template <typename Attribute, typename ActualAttribute> - struct make_attribute - { - typedef typename remove_const<Attribute>::type attribute_type; - typedef typename - mpl::if_< - is_same<typename remove_const<ActualAttribute>::type, unused_type> - , attribute_type - , ActualAttribute&>::type - type; - - typedef typename - mpl::if_< - is_same<typename remove_const<ActualAttribute>::type, unused_type> - , attribute_type - , ActualAttribute>::type - value_type; - - static Attribute call(unused_type) - { - // synthesize the attribute/parameter - return boost::get(value_initialized<attribute_type>()); - } - - template <typename T> - static T& call(T& value) - { - return value; // just pass the one provided - } + BOOST_STATIC_ASSERT_MSG(!is_reference<Exposed>::value, + "Exposed cannot be a reference type"); + BOOST_STATIC_ASSERT_MSG(!is_reference<Transformed>::value, + "Transformed cannot be a reference type"); }; - template <typename Attribute, typename ActualAttribute> - struct make_attribute<Attribute&, ActualAttribute> - : make_attribute<Attribute, ActualAttribute> + template <typename Transformed, typename Domain> + struct transform_attribute<unused_type, Transformed, Domain> + : detail::synthesize_attribute<Transformed> {}; - template <typename Attribute, typename ActualAttribute> - struct make_attribute<Attribute const&, ActualAttribute> - : make_attribute<Attribute const, ActualAttribute> + template <typename Transformed, typename Domain> + struct transform_attribute<unused_type const, Transformed, Domain> + : detail::synthesize_attribute<Transformed> {}; - template <typename ActualAttribute> - struct make_attribute<unused_type, ActualAttribute> - { - typedef unused_type type; - typedef unused_type value_type; - static unused_type call(unused_type) - { - return unused; - } - }; - /////////////////////////////////////////////////////////////////////////// // swap_impl // @@ -1381,14 +1340,4 @@ namespace boost { namespace spirit { namespace traits } }}} -/////////////////////////////////////////////////////////////////////////////// -namespace boost { namespace spirit { namespace result_of -{ - template <typename Exposed, typename Transformed, typename Domain> - struct pre_transform - : traits::transform_attribute<Exposed, Transformed, Domain> - {}; -}}} - - #endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/attributes_fwd.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/attributes_fwd.hpp index 6086d3709d..a9a62fedb5 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/attributes_fwd.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/attributes_fwd.hpp @@ -30,9 +30,6 @@ namespace boost { namespace spirit { namespace result_of template <typename T, typename Attribute> struct attribute_as; - template <typename Exposed, typename Transformed, typename Domain> - struct pre_transform; - template <typename T> struct optional_value; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_class.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_class.hpp index c9c6e51c27..d3bd4dc2b3 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_class.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_class.hpp @@ -12,10 +12,6 @@ #pragma once #endif -#include <string> - -#include <boost/spirit/include/phoenix_limits.hpp> // needs to be included before proto -#include <boost/proto/proto.hpp> #include <boost/config.hpp> #include <boost/mpl/bool.hpp> #include <boost/spirit/home/support/unused.hpp> @@ -285,7 +281,7 @@ namespace boost { namespace spirit { namespace char_class template <typename CharEncoding> struct classify { - typedef typename CharEncoding::char_type char_type; + typedef typename CharEncoding::classify_type char_type; #define BOOST_SPIRIT_CLASSIFY(name, isname) \ template <typename Char> \ @@ -511,7 +507,7 @@ namespace boost { namespace spirit { namespace char_class template <typename CharEncoding> struct convert { - typedef typename CharEncoding::char_type char_type; + typedef typename CharEncoding::classify_type char_type; template <typename Char> static Char @@ -754,39 +750,14 @@ namespace boost { namespace spirit { namespace char_class namespace boost { namespace spirit { namespace traits { /////////////////////////////////////////////////////////////////////////// - // This meta-function evaluates to mpl::true_ if the function - // char_encoding::ischar() needs to be called to ensure correct matching. - // This happens mainly if the character type returned from the underlying - // iterator is larger than the character type of the used character - // encoding. Additionally, this meta-function provides a customization - // point for the lexer library to enforce this behavior while parsing - // a token stream. - template <typename Char, typename BaseChar> - struct mustcheck_ischar - : mpl::bool_<(sizeof(Char) > sizeof(BaseChar)) ? true : false> {}; - - /////////////////////////////////////////////////////////////////////////// - // The following template calls char_encoding::ischar, if necessary - template <typename CharParam, typename CharEncoding - , bool MustCheck = mustcheck_ischar< - CharParam, typename CharEncoding::char_type>::value> - struct ischar - { - static bool call(CharParam) - { - return true; - } - }; - template <typename CharParam, typename CharEncoding> - struct ischar<CharParam, CharEncoding, true> + struct ischar { static bool call(CharParam const& ch) { - return CharEncoding::ischar(int(ch)); + return CharEncoding::ischar(int(ch)); } }; - }}} #if defined(BOOST_MSVC) diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/ascii.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/ascii.hpp index 4e6aace036..db215ce950 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/ascii.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/ascii.hpp @@ -183,6 +183,7 @@ namespace boost { namespace spirit { namespace char_encoding struct ascii { typedef char char_type; + typedef unsigned char classify_type; static bool isascii_(int ch) @@ -196,10 +197,22 @@ namespace boost { namespace spirit { namespace char_encoding return isascii_(ch); } + // *** Note on assertions: The precondition is that the calls to + // these functions do not violate the required range of ch (type int) + // which is that strict_ischar(ch) should be true. It is the + // responsibility of the caller to make sure this precondition is not + // violated. + + static bool + strict_ischar(int ch) + { + return ch >= 0 && ch <= 127; + } + static bool isalnum(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + BOOST_ASSERT(strict_ischar(ch)); return (ascii_char_types[ch] & BOOST_CC_ALPHA) || (ascii_char_types[ch] & BOOST_CC_DIGIT); } @@ -207,74 +220,77 @@ namespace boost { namespace spirit { namespace char_encoding static bool isalpha(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + BOOST_ASSERT(strict_ischar(ch)); return (ascii_char_types[ch] & BOOST_CC_ALPHA) ? true : false; } static bool isdigit(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + BOOST_ASSERT(strict_ischar(ch)); return (ascii_char_types[ch] & BOOST_CC_DIGIT) ? true : false; } static bool isxdigit(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + BOOST_ASSERT(strict_ischar(ch)); return (ascii_char_types[ch] & BOOST_CC_XDIGIT) ? true : false; } static bool iscntrl(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + BOOST_ASSERT(strict_ischar(ch)); return (ascii_char_types[ch] & BOOST_CC_CTRL) ? true : false; } static bool isgraph(int ch) { + BOOST_ASSERT(strict_ischar(ch)); return ('\x21' <= ch && ch <= '\x7e'); } static bool islower(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + BOOST_ASSERT(strict_ischar(ch)); return (ascii_char_types[ch] & BOOST_CC_LOWER) ? true : false; } static bool isprint(int ch) { + BOOST_ASSERT(strict_ischar(ch)); return ('\x20' <= ch && ch <= '\x7e'); } static bool ispunct(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + BOOST_ASSERT(strict_ischar(ch)); return (ascii_char_types[ch] & BOOST_CC_PUNCT) ? true : false; } static bool isspace(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + BOOST_ASSERT(strict_ischar(ch)); return (ascii_char_types[ch] & BOOST_CC_SPACE) ? true : false; } static bool isblank BOOST_PREVENT_MACRO_SUBSTITUTION (int ch) { + BOOST_ASSERT(strict_ischar(ch)); return ('\x09' == ch || '\x20' == ch); } static bool isupper(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + BOOST_ASSERT(strict_ischar(ch)); return (ascii_char_types[ch] & BOOST_CC_UPPER) ? true : false; } @@ -285,18 +301,21 @@ namespace boost { namespace spirit { namespace char_encoding static int tolower(int ch) { + BOOST_ASSERT(strict_ischar(ch)); return isupper(ch) ? (ch - 'A' + 'a') : ch; } static int toupper(int ch) { + BOOST_ASSERT(strict_ischar(ch)); return islower(ch) ? (ch - 'a' + 'A') : ch; } static ::boost::uint32_t toucs4(int ch) { + BOOST_ASSERT(strict_ischar(ch)); return ch; } }; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/iso8859_1.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/iso8859_1.hpp index b2b5dd1d8a..adaec02b65 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/iso8859_1.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/iso8859_1.hpp @@ -203,101 +203,101 @@ namespace boost { namespace spirit { namespace char_encoding /* -- 158 9e */ BOOST_CC_CTRL, /* -- 159 9f */ BOOST_CC_CTRL, /* 160 a0 */ BOOST_CC_SPACE, - /* ¡ 161 a1 */ BOOST_CC_PUNCT, - /* ¢ 162 a2 */ BOOST_CC_PUNCT, - /* £ 163 a3 */ BOOST_CC_PUNCT, - /* ¤ 164 a4 */ BOOST_CC_PUNCT, - /* ¥ 165 a5 */ BOOST_CC_PUNCT, - /* ¦ 166 a6 */ BOOST_CC_PUNCT, - /* § 167 a7 */ BOOST_CC_PUNCT, - /* ¨ 168 a8 */ BOOST_CC_PUNCT, - /* © 169 a9 */ BOOST_CC_PUNCT, - /* ª 170 aa */ BOOST_CC_PUNCT, - /* « 171 ab */ BOOST_CC_PUNCT, - /* ¬ 172 ac */ BOOST_CC_PUNCT, - /* 173 ad */ BOOST_CC_PUNCT, - /* ® 174 ae */ BOOST_CC_PUNCT, - /* ¯ 175 af */ BOOST_CC_PUNCT, - /* ° 176 b0 */ BOOST_CC_PUNCT, - /* ± 177 b1 */ BOOST_CC_PUNCT, - /* ² 178 b2 */ BOOST_CC_DIGIT|BOOST_CC_PUNCT, - /* ³ 179 b3 */ BOOST_CC_DIGIT|BOOST_CC_PUNCT, - /* ´ 180 b4 */ BOOST_CC_PUNCT, - /* µ 181 b5 */ BOOST_CC_PUNCT, - /* ¶ 182 b6 */ BOOST_CC_PUNCT, - /* · 183 b7 */ BOOST_CC_PUNCT, - /* ¸ 184 b8 */ BOOST_CC_PUNCT, - /* ¹ 185 b9 */ BOOST_CC_DIGIT|BOOST_CC_PUNCT, - /* º 186 ba */ BOOST_CC_PUNCT, - /* » 187 bb */ BOOST_CC_PUNCT, - /* ¼ 188 bc */ BOOST_CC_PUNCT, - /* ½ 189 bd */ BOOST_CC_PUNCT, - /* ¾ 190 be */ BOOST_CC_PUNCT, - /* ¿ 191 bf */ BOOST_CC_PUNCT, - /* À 192 c0 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Á 193 c1 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /*  194 c2 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* à 195 c3 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ä 196 c4 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Å 197 c5 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Æ 198 c6 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ç 199 c7 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* È 200 c8 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* É 201 c9 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ê 202 ca */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ë 203 cb */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ì 204 cc */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Í 205 cd */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Î 206 ce */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ï 207 cf */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ð 208 d0 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ñ 209 d1 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ò 210 d2 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ó 211 d3 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ô 212 d4 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Õ 213 d5 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ö 214 d6 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* × 215 d7 */ BOOST_CC_PUNCT, - /* Ø 216 d8 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ù 217 d9 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ú 218 da */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Û 219 db */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ü 220 dc */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Ý 221 dd */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* Þ 222 de */ BOOST_CC_ALPHA|BOOST_CC_UPPER, - /* ß 223 df */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* à 224 e0 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* á 225 e1 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* â 226 e2 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ã 227 e3 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ä 228 e4 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* å 229 e5 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* æ 230 e6 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ç 231 e7 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* è 232 e8 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* é 233 e9 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ê 234 ea */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ë 235 eb */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ì 236 ec */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* í 237 ed */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* î 238 ee */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ï 239 ef */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ð 240 f0 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ñ 241 f1 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ò 242 f2 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ó 243 f3 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ô 244 f4 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* õ 245 f5 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ö 246 f6 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ÷ 247 f7 */ BOOST_CC_PUNCT, - /* ø 248 f8 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ù 249 f9 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ú 250 fa */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* û 251 fb */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ü 252 fc */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ý 253 fd */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* þ 254 fe */ BOOST_CC_ALPHA|BOOST_CC_LOWER, - /* ÿ 255 ff */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 161 a1 */ BOOST_CC_PUNCT, + /* � 162 a2 */ BOOST_CC_PUNCT, + /* � 163 a3 */ BOOST_CC_PUNCT, + /* � 164 a4 */ BOOST_CC_PUNCT, + /* � 165 a5 */ BOOST_CC_PUNCT, + /* � 166 a6 */ BOOST_CC_PUNCT, + /* � 167 a7 */ BOOST_CC_PUNCT, + /* � 168 a8 */ BOOST_CC_PUNCT, + /* � 169 a9 */ BOOST_CC_PUNCT, + /* � 170 aa */ BOOST_CC_PUNCT, + /* � 171 ab */ BOOST_CC_PUNCT, + /* � 172 ac */ BOOST_CC_PUNCT, + /* � 173 ad */ BOOST_CC_PUNCT, + /* � 174 ae */ BOOST_CC_PUNCT, + /* � 175 af */ BOOST_CC_PUNCT, + /* � 176 b0 */ BOOST_CC_PUNCT, + /* � 177 b1 */ BOOST_CC_PUNCT, + /* � 178 b2 */ BOOST_CC_DIGIT|BOOST_CC_PUNCT, + /* � 179 b3 */ BOOST_CC_DIGIT|BOOST_CC_PUNCT, + /* � 180 b4 */ BOOST_CC_PUNCT, + /* � 181 b5 */ BOOST_CC_PUNCT, + /* � 182 b6 */ BOOST_CC_PUNCT, + /* � 183 b7 */ BOOST_CC_PUNCT, + /* � 184 b8 */ BOOST_CC_PUNCT, + /* � 185 b9 */ BOOST_CC_DIGIT|BOOST_CC_PUNCT, + /* � 186 ba */ BOOST_CC_PUNCT, + /* � 187 bb */ BOOST_CC_PUNCT, + /* � 188 bc */ BOOST_CC_PUNCT, + /* � 189 bd */ BOOST_CC_PUNCT, + /* � 190 be */ BOOST_CC_PUNCT, + /* � 191 bf */ BOOST_CC_PUNCT, + /* � 192 c0 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 193 c1 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 194 c2 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 195 c3 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 196 c4 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 197 c5 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 198 c6 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 199 c7 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 200 c8 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 201 c9 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 202 ca */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 203 cb */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 204 cc */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 205 cd */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 206 ce */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 207 cf */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 208 d0 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 209 d1 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 210 d2 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 211 d3 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 212 d4 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 213 d5 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 214 d6 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 215 d7 */ BOOST_CC_PUNCT, + /* � 216 d8 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 217 d9 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 218 da */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 219 db */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 220 dc */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 221 dd */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 222 de */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* � 223 df */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 224 e0 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 225 e1 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 226 e2 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 227 e3 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 228 e4 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 229 e5 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 230 e6 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 231 e7 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 232 e8 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 233 e9 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 234 ea */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 235 eb */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 236 ec */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 237 ed */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 238 ee */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 239 ef */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 240 f0 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 241 f1 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 242 f2 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 243 f3 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 244 f4 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 245 f5 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 246 f6 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 247 f7 */ BOOST_CC_PUNCT, + /* � 248 f8 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 249 f9 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 250 fa */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 251 fb */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 252 fc */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 253 fd */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 254 fe */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* � 255 ff */ BOOST_CC_ALPHA|BOOST_CC_LOWER, }; /////////////////////////////////////////////////////////////////////////// @@ -466,101 +466,101 @@ namespace boost { namespace spirit { namespace char_encoding /* -- 158 9e */ '\0', /* -- 159 9f */ '\0', /* 160 a0 */ '\0', - /* ¡ 161 a1 */ '\0', - /* ¢ 162 a2 */ '\0', - /* £ 163 a3 */ '\0', - /* ¤ 164 a4 */ '\0', - /* ¥ 165 a5 */ '\0', - /* ¦ 166 a6 */ '\0', - /* § 167 a7 */ '\0', - /* ¨ 168 a8 */ '\0', - /* © 169 a9 */ '\0', - /* ª 170 aa */ '\0', - /* « 171 ab */ '\0', - /* ¬ 172 ac */ '\0', - /* 173 ad */ '\0', - /* ® 174 ae */ '\0', - /* ¯ 175 af */ '\0', - /* ° 176 b0 */ '\0', - /* ± 177 b1 */ '\0', - /* ² 178 b2 */ '\0', - /* ³ 179 b3 */ '\0', - /* ´ 180 b4 */ '\0', - /* µ 181 b5 */ '\0', - /* ¶ 182 b6 */ '\0', - /* · 183 b7 */ '\0', - /* ¸ 184 b8 */ '\0', - /* ¹ 185 b9 */ '\0', - /* º 186 ba */ '\0', - /* » 187 bb */ '\0', - /* ¼ 188 bc */ '\0', - /* ½ 189 bd */ '\0', - /* ¾ 190 be */ '\0', - /* ¿ 191 bf */ '\0', - /* à 192 c0 */ 0xe0, - /* á 193 c1 */ 0xe1, - /* â 194 c2 */ 0xe2, - /* ã 195 c3 */ 0xe3, - /* ä 196 c4 */ 0xe4, - /* å 197 c5 */ 0xe5, - /* æ 198 c6 */ 0xe6, - /* ç 199 c7 */ 0xe7, - /* è 200 c8 */ 0xe8, - /* é 201 c9 */ 0xe9, - /* ê 202 ca */ 0xea, - /* ë 203 cb */ 0xeb, - /* ì 204 cc */ 0xec, - /* í 205 cd */ 0xed, - /* î 206 ce */ 0xee, - /* ï 207 cf */ 0xef, - /* ð 208 d0 */ 0xf0, - /* ñ 209 d1 */ 0xf1, - /* ò 210 d2 */ 0xf2, - /* ó 211 d3 */ 0xf3, - /* ô 212 d4 */ 0xf4, - /* õ 213 d5 */ 0xf5, - /* ö 214 d6 */ 0xf6, - /* × 215 d7 */ '\0', - /* ø 216 d8 */ 0xf8, - /* ù 217 d9 */ 0xf9, - /* ú 218 da */ 0xfa, - /* û 219 db */ 0xfb, - /* ü 220 dc */ 0xfc, - /* ý 221 dd */ 0xfd, - /* þ 222 de */ 0xfe, - /* ß 223 df */ '\0', - /* À 224 e0 */ 0xc0, - /* Á 225 e1 */ 0xc1, - /*  226 e2 */ 0xc2, - /* à 227 e3 */ 0xc3, - /* Ä 228 e4 */ 0xc4, - /* Å 229 e5 */ 0xc5, - /* Æ 230 e6 */ 0xc6, - /* Ç 231 e7 */ 0xc7, - /* È 232 e8 */ 0xc8, - /* É 233 e9 */ 0xc9, - /* Ê 234 ea */ 0xca, - /* Ë 235 eb */ 0xcb, - /* Ì 236 ec */ 0xcc, - /* Í 237 ed */ 0xcd, - /* Î 238 ee */ 0xce, - /* Ï 239 ef */ 0xcf, - /* Ð 240 f0 */ 0xd0, - /* Ñ 241 f1 */ 0xd1, - /* Ò 242 f2 */ 0xd2, - /* Ó 243 f3 */ 0xd3, - /* Ô 244 f4 */ 0xd4, - /* Õ 245 f5 */ 0xd5, - /* Ö 246 f6 */ 0xd6, - /* ÷ 247 f7 */ '\0', - /* Ø 248 f8 */ 0xd8, - /* Ù 249 f9 */ 0xd9, - /* Ú 250 fa */ 0xda, - /* Û 251 fb */ 0xdb, - /* Ü 252 fc */ 0xdc, - /* Ý 253 fd */ 0xdd, - /* Þ 254 fe */ 0xde, - /* ÿ 255 ff */ '\0', + /* � 161 a1 */ '\0', + /* � 162 a2 */ '\0', + /* � 163 a3 */ '\0', + /* � 164 a4 */ '\0', + /* � 165 a5 */ '\0', + /* � 166 a6 */ '\0', + /* � 167 a7 */ '\0', + /* � 168 a8 */ '\0', + /* � 169 a9 */ '\0', + /* � 170 aa */ '\0', + /* � 171 ab */ '\0', + /* � 172 ac */ '\0', + /* � 173 ad */ '\0', + /* � 174 ae */ '\0', + /* � 175 af */ '\0', + /* � 176 b0 */ '\0', + /* � 177 b1 */ '\0', + /* � 178 b2 */ '\0', + /* � 179 b3 */ '\0', + /* � 180 b4 */ '\0', + /* � 181 b5 */ '\0', + /* � 182 b6 */ '\0', + /* � 183 b7 */ '\0', + /* � 184 b8 */ '\0', + /* � 185 b9 */ '\0', + /* � 186 ba */ '\0', + /* � 187 bb */ '\0', + /* � 188 bc */ '\0', + /* � 189 bd */ '\0', + /* � 190 be */ '\0', + /* � 191 bf */ '\0', + /* � 192 c0 */ 0xe0, + /* � 193 c1 */ 0xe1, + /* � 194 c2 */ 0xe2, + /* � 195 c3 */ 0xe3, + /* � 196 c4 */ 0xe4, + /* � 197 c5 */ 0xe5, + /* � 198 c6 */ 0xe6, + /* � 199 c7 */ 0xe7, + /* � 200 c8 */ 0xe8, + /* � 201 c9 */ 0xe9, + /* � 202 ca */ 0xea, + /* � 203 cb */ 0xeb, + /* � 204 cc */ 0xec, + /* � 205 cd */ 0xed, + /* � 206 ce */ 0xee, + /* � 207 cf */ 0xef, + /* � 208 d0 */ 0xf0, + /* � 209 d1 */ 0xf1, + /* � 210 d2 */ 0xf2, + /* � 211 d3 */ 0xf3, + /* � 212 d4 */ 0xf4, + /* � 213 d5 */ 0xf5, + /* � 214 d6 */ 0xf6, + /* � 215 d7 */ '\0', + /* � 216 d8 */ 0xf8, + /* � 217 d9 */ 0xf9, + /* � 218 da */ 0xfa, + /* � 219 db */ 0xfb, + /* � 220 dc */ 0xfc, + /* � 221 dd */ 0xfd, + /* � 222 de */ 0xfe, + /* � 223 df */ '\0', + /* � 224 e0 */ 0xc0, + /* � 225 e1 */ 0xc1, + /* � 226 e2 */ 0xc2, + /* � 227 e3 */ 0xc3, + /* � 228 e4 */ 0xc4, + /* � 229 e5 */ 0xc5, + /* � 230 e6 */ 0xc6, + /* � 231 e7 */ 0xc7, + /* � 232 e8 */ 0xc8, + /* � 233 e9 */ 0xc9, + /* � 234 ea */ 0xca, + /* � 235 eb */ 0xcb, + /* � 236 ec */ 0xcc, + /* � 237 ed */ 0xcd, + /* � 238 ee */ 0xce, + /* � 239 ef */ 0xcf, + /* � 240 f0 */ 0xd0, + /* � 241 f1 */ 0xd1, + /* � 242 f2 */ 0xd2, + /* � 243 f3 */ 0xd3, + /* � 244 f4 */ 0xd4, + /* � 245 f5 */ 0xd5, + /* � 246 f6 */ 0xd6, + /* � 247 f7 */ '\0', + /* � 248 f8 */ 0xd8, + /* � 249 f9 */ 0xd9, + /* � 250 fa */ 0xda, + /* � 251 fb */ 0xdb, + /* � 252 fc */ 0xdc, + /* � 253 fd */ 0xdd, + /* � 254 fe */ 0xde, + /* � 255 ff */ '\0', }; /////////////////////////////////////////////////////////////////////////// @@ -569,6 +569,7 @@ namespace boost { namespace spirit { namespace char_encoding struct iso8859_1 { typedef unsigned char char_type; + typedef unsigned char classify_type; static bool isascii_(int ch) @@ -581,13 +582,25 @@ namespace boost { namespace spirit { namespace char_encoding { // iso8859.1 uses all 8 bits // we have to watch out for sign extensions - return (0 == (ch & ~0xff) || ~0 == (ch | 0xff)) ? true : false; + return (0 == (ch & ~0xff) || ~0 == (ch | 0xff)) != 0; + } + + // *** Note on assertions: The precondition is that the calls to + // these functions do not violate the required range of ch (type int) + // which is that strict_ischar(ch) should be true. It is the + // responsibility of the caller to make sure this precondition is not + // violated. + + static bool + strict_ischar(int ch) + { + return ch >= 0 && ch <= 255; } static bool isalnum(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + BOOST_ASSERT(strict_ischar(ch)); return (iso8859_1_char_types[ch] & BOOST_CC_ALPHA) || (iso8859_1_char_types[ch] & BOOST_CC_DIGIT); } @@ -595,29 +608,29 @@ namespace boost { namespace spirit { namespace char_encoding static bool isalpha(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); - return (iso8859_1_char_types[ch] & BOOST_CC_ALPHA) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return (iso8859_1_char_types[ch] & BOOST_CC_ALPHA) != 0; } static bool isdigit(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); - return (iso8859_1_char_types[ch] & BOOST_CC_DIGIT) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return (iso8859_1_char_types[ch] & BOOST_CC_DIGIT) != 0; } static bool isxdigit(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); - return (iso8859_1_char_types[ch] & BOOST_CC_XDIGIT) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return (iso8859_1_char_types[ch] & BOOST_CC_XDIGIT) != 0; } static bool iscntrl(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); - return (iso8859_1_char_types[ch] & BOOST_CC_CTRL) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return (iso8859_1_char_types[ch] & BOOST_CC_CTRL) != 0; } static bool @@ -629,8 +642,8 @@ namespace boost { namespace spirit { namespace char_encoding static bool islower(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); - return (iso8859_1_char_types[ch] & BOOST_CC_LOWER) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return (iso8859_1_char_types[ch] & BOOST_CC_LOWER) != 0; } static bool @@ -642,28 +655,29 @@ namespace boost { namespace spirit { namespace char_encoding static bool ispunct(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); - return (iso8859_1_char_types[ch] & BOOST_CC_PUNCT) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return (iso8859_1_char_types[ch] & BOOST_CC_PUNCT) != 0; } static bool isspace(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); - return (iso8859_1_char_types[ch] & BOOST_CC_SPACE) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return (iso8859_1_char_types[ch] & BOOST_CC_SPACE) != 0; } static bool isblank BOOST_PREVENT_MACRO_SUBSTITUTION (int ch) { + BOOST_ASSERT(strict_ischar(ch)); return ('\x09' == ch || '\x20' == ch || '\xa0' == ch); } static bool isupper(int ch) { - BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); - return (iso8859_1_char_types[ch] & BOOST_CC_UPPER) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return (iso8859_1_char_types[ch] & BOOST_CC_UPPER) != 0; } /////////////////////////////////////////////////////////////////////////// @@ -673,6 +687,7 @@ namespace boost { namespace spirit { namespace char_encoding static int tolower(int ch) { + BOOST_ASSERT(strict_ischar(ch)); return isupper(ch) && '\0' != iso8859_1_char_conversion[ch] ? iso8859_1_char_conversion[ch] : ch; } @@ -680,6 +695,7 @@ namespace boost { namespace spirit { namespace char_encoding static int toupper(int ch) { + BOOST_ASSERT(strict_ischar(ch)); return islower(ch) && '\0' != iso8859_1_char_conversion[ch] ? iso8859_1_char_conversion[ch] : ch; } @@ -689,6 +705,7 @@ namespace boost { namespace spirit { namespace char_encoding { // The first 256 characters in Unicode and the UCS are // identical to those in ISO/IEC-8859-1. + BOOST_ASSERT(strict_ischar(ch)); return ch; } }; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/standard.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/standard.hpp index fb307ced45..f738fb0abf 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/standard.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/standard.hpp @@ -13,6 +13,8 @@ #endif #include <cctype> +#include <climits> +#include <boost/assert.hpp> #include <boost/cstdint.hpp> namespace boost { namespace spirit { namespace char_encoding @@ -23,6 +25,7 @@ namespace boost { namespace spirit { namespace char_encoding struct standard { typedef char char_type; + typedef unsigned char classify_type; static bool isascii_(int ch) @@ -35,79 +38,104 @@ namespace boost { namespace spirit { namespace char_encoding { // uses all 8 bits // we have to watch out for sign extensions - return (0 == (ch & ~0xff) || ~0 == (ch | 0xff)) ? true : false; + return (0 == (ch & ~0xff) || ~0 == (ch | 0xff)) != 0; + } + + // *** Note on assertions: The precondition is that the calls to + // these functions do not violate the required range of ch (int) + // which is that strict_ischar(ch) should be true. It is the + // responsibility of the caller to make sure this precondition is not + // violated. + + static bool + strict_ischar(int ch) + { + // ch should be representable as an unsigned char + return ch >= 0 && ch <= UCHAR_MAX; } static bool isalnum(int ch) { - return std::isalnum(ch) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return std::isalnum(ch) != 0; } static bool isalpha(int ch) { - return std::isalpha(ch) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return std::isalpha(ch) != 0; } static bool isdigit(int ch) { - return std::isdigit(ch) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return std::isdigit(ch) != 0; } static bool isxdigit(int ch) { - return std::isxdigit(ch) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return std::isxdigit(ch) != 0; } static bool iscntrl(int ch) { - return std::iscntrl(ch) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return std::iscntrl(ch) != 0; } static bool isgraph(int ch) { - return std::isgraph(ch) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return std::isgraph(ch) != 0; } static bool islower(int ch) { - return std::islower(ch) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return std::islower(ch) != 0; } static bool isprint(int ch) { - return std::isprint(ch) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return std::isprint(ch) != 0; } static bool ispunct(int ch) { - return std::ispunct(ch) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return std::ispunct(ch) != 0; } static bool isspace(int ch) { - return std::isspace(ch) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return std::isspace(ch) != 0; } static bool isblank BOOST_PREVENT_MACRO_SUBSTITUTION (int ch) { + BOOST_ASSERT(strict_ischar(ch)); return (ch == ' ' || ch == '\t'); } static bool isupper(int ch) { - return std::isupper(ch) ? true : false; + BOOST_ASSERT(strict_ischar(ch)); + return std::isupper(ch) != 0; } /////////////////////////////////////////////////////////////////////////////// @@ -117,22 +145,24 @@ namespace boost { namespace spirit { namespace char_encoding static int tolower(int ch) { + BOOST_ASSERT(strict_ischar(ch)); return std::tolower(ch); } static int toupper(int ch) { + BOOST_ASSERT(strict_ischar(ch)); return std::toupper(ch); } static ::boost::uint32_t toucs4(int ch) { + BOOST_ASSERT(strict_ischar(ch)); return ch; } }; }}} #endif - diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/standard_wide.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/standard_wide.hpp index 515a388136..e324bd2b82 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/standard_wide.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/standard_wide.hpp @@ -15,9 +15,12 @@ #include <cwctype> #include <string> +#include <boost/assert.hpp> #include <boost/cstdint.hpp> #include <boost/spirit/home/support/assert_msg.hpp> +#include <boost/type_traits/make_unsigned.hpp> + namespace boost { namespace spirit { namespace traits { template <std::size_t N> @@ -42,6 +45,7 @@ namespace boost { namespace spirit { namespace char_encoding struct standard_wide { typedef wchar_t char_type; + typedef wchar_t classify_type; template <typename Char> static typename std::char_traits<Char>::int_type @@ -60,92 +64,92 @@ namespace boost { namespace spirit { namespace char_encoding static bool ischar(int ch) { - // we have to watch out for sign extensions (casting is there to + // we have to watch out for sign extensions (casting is there to // silence certain compilers complaining about signed/unsigned // mismatch) return ( - std::size_t(0) == - std::size_t(ch & ~traits::wchar_t_size<sizeof(wchar_t)>::mask) || - std::size_t(~0) == + std::size_t(0) == + std::size_t(ch & ~traits::wchar_t_size<sizeof(wchar_t)>::mask) || + std::size_t(~0) == std::size_t(ch | traits::wchar_t_size<sizeof(wchar_t)>::mask) - ) ? true : false; // any wchar_t, but no other bits set + ) != 0; // any wchar_t, but no other bits set } static bool isalnum(wchar_t ch) { using namespace std; - return iswalnum(to_int_type(ch)) ? true : false; + return iswalnum(to_int_type(ch)) != 0; } static bool isalpha(wchar_t ch) { using namespace std; - return iswalpha(to_int_type(ch)) ? true : false; + return iswalpha(to_int_type(ch)) != 0; } static bool iscntrl(wchar_t ch) { using namespace std; - return iswcntrl(to_int_type(ch)) ? true : false; + return iswcntrl(to_int_type(ch)) != 0; } static bool isdigit(wchar_t ch) { using namespace std; - return iswdigit(to_int_type(ch)) ? true : false; + return iswdigit(to_int_type(ch)) != 0; } static bool isgraph(wchar_t ch) { using namespace std; - return iswgraph(to_int_type(ch)) ? true : false; + return iswgraph(to_int_type(ch)) != 0; } static bool islower(wchar_t ch) { using namespace std; - return iswlower(to_int_type(ch)) ? true : false; + return iswlower(to_int_type(ch)) != 0; } static bool isprint(wchar_t ch) { using namespace std; - return iswprint(to_int_type(ch)) ? true : false; + return iswprint(to_int_type(ch)) != 0; } static bool ispunct(wchar_t ch) { using namespace std; - return iswpunct(to_int_type(ch)) ? true : false; + return iswpunct(to_int_type(ch)) != 0; } static bool isspace(wchar_t ch) { using namespace std; - return iswspace(to_int_type(ch)) ? true : false; + return iswspace(to_int_type(ch)) != 0; } static bool isupper(wchar_t ch) { using namespace std; - return iswupper(to_int_type(ch)) ? true : false; + return iswupper(to_int_type(ch)) != 0; } static bool isxdigit(wchar_t ch) { using namespace std; - return iswxdigit(to_int_type(ch)) ? true : false; + return iswxdigit(to_int_type(ch)) != 0; } static bool @@ -175,12 +179,11 @@ namespace boost { namespace spirit { namespace char_encoding } static ::boost::uint32_t - toucs4(int ch) + toucs4(wchar_t ch) { - return ch; + return static_cast<make_unsigned<wchar_t>::type>(ch); } }; }}} #endif - diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/unicode.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/unicode.hpp index b5ec3e6f96..53cbb286f6 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/unicode.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_encoding/unicode.hpp @@ -22,7 +22,12 @@ namespace boost { namespace spirit { namespace char_encoding /////////////////////////////////////////////////////////////////////////// struct unicode { +#ifdef BOOST_NO_CXX11_CHAR32_T typedef ::boost::uint32_t char_type; +#else + typedef char32_t char_type; +#endif + typedef ::boost::uint32_t classify_type; /////////////////////////////////////////////////////////////////////////// // Posix stuff diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_set/range_functions.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_set/range_functions.hpp index 9afde6f482..ea2fb9f0ec 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_set/range_functions.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/char_set/range_functions.hpp @@ -11,7 +11,7 @@ #pragma once #endif -#include <boost/integer_traits.hpp> +#include <limits> namespace boost { namespace spirit { namespace support { namespace detail { @@ -47,14 +47,14 @@ namespace boost { namespace spirit { namespace support { namespace detail // another range 'other', so we can merge them typedef typename Range::value_type value_type; - typedef integer_traits<value_type> integer_traits; + typedef std::numeric_limits<value_type> limits; value_type decr_first = - range.first == integer_traits::const_min + range.first == (limits::min)() ? range.first : range.first-1; value_type incr_last = - range.last == integer_traits::const_max + range.last == (limits::max)() ? range.last : range.last+1; return (decr_first <= other.last) && (incr_last >= other.first); diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/common_terminals.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/common_terminals.hpp index cab01c1c27..7bf65312e6 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/common_terminals.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/common_terminals.hpp @@ -19,6 +19,7 @@ #include <boost/spirit/home/support/char_encoding/iso8859_1.hpp> #include <boost/spirit/home/support/char_class.hpp> #include <boost/mpl/vector.hpp> +#include <boost/proto/traits.hpp> #if defined(BOOST_SPIRIT_UNICODE) # include <boost/spirit/home/support/char_encoding/unicode.hpp> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/container.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/container.hpp index 5e154cdb7b..3df9e80c52 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/container.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/container.hpp @@ -15,14 +15,14 @@ #include <boost/spirit/home/support/unused.hpp> #include <boost/spirit/home/support/attributes_fwd.hpp> -#include <boost/detail/iterator.hpp> // for boost::detail::iterator_traits #include <boost/mpl/has_xxx.hpp> #include <boost/mpl/bool.hpp> #include <boost/optional.hpp> #include <boost/variant.hpp> #include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/repeat.hpp> -#include <boost/range/iterator_range.hpp> +#include <boost/range/range_fwd.hpp> +#include <iterator> // for std::iterator_traits namespace boost { namespace spirit { namespace traits { @@ -207,8 +207,7 @@ namespace boost { namespace spirit { namespace traits template <typename Iterator> struct container_iterator<iterator_range<Iterator> > { - typedef typename range_const_iterator< - iterator_range<Iterator> >::type type; + typedef Iterator type; }; template <> @@ -465,7 +464,7 @@ namespace boost { namespace spirit { namespace traits template <typename Iterator, typename Enable/* = void*/> struct deref_iterator { - typedef typename boost::detail::iterator_traits<Iterator>::reference type; + typedef typename std::iterator_traits<Iterator>::reference type; static type call(Iterator& it) { return *it; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/context.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/context.hpp index ada873aa72..3e7e35d578 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/context.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/context.hpp @@ -14,7 +14,6 @@ #endif #include <boost/preprocessor/repetition/repeat_from_to.hpp> -#include <boost/spirit/include/phoenix_core.hpp> #include <boost/spirit/home/support/nonterminal/expand_arg.hpp> #include <boost/spirit/home/support/assert_msg.hpp> #include <boost/spirit/home/support/argument.hpp> @@ -25,6 +24,10 @@ #include <boost/fusion/include/transform.hpp> #include <boost/mpl/size.hpp> #include <boost/mpl/at.hpp> +#include <boost/phoenix/core/actor.hpp> +#include <boost/phoenix/core/terminal.hpp> +#include <boost/phoenix/core/v2_eval.hpp> +#include <boost/proto/proto_fwd.hpp> // for transform placeholders /////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/hold_any.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/hold_any.hpp index d8b08dc1ee..5d1bdfa632 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/hold_any.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/hold_any.hpp @@ -25,12 +25,12 @@ #include <boost/static_assert.hpp> #include <boost/mpl/bool.hpp> #include <boost/assert.hpp> -#include <boost/detail/sp_typeinfo.hpp> +#include <boost/core/typeinfo.hpp> -#include <stdexcept> -#include <typeinfo> #include <algorithm> #include <iosfwd> +#include <stdexcept> +#include <typeinfo> /////////////////////////////////////////////////////////////////////////////// #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) @@ -45,11 +45,14 @@ namespace boost { namespace spirit struct bad_any_cast : std::bad_cast { - bad_any_cast(boost::detail::sp_typeinfo const& src, boost::detail::sp_typeinfo const& dest) + bad_any_cast(boost::core::typeinfo const& src, boost::core::typeinfo const& dest) : from(src.name()), to(dest.name()) {} - virtual const char* what() const BOOST_NOEXCEPT_OR_NOTHROW { return "bad any cast"; } + const char* what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE + { + return "bad any cast"; + } const char* from; const char* to; @@ -61,7 +64,7 @@ namespace boost { namespace spirit template <typename Char> struct fxn_ptr_table { - boost::detail::sp_typeinfo const& (*get_type)(); + boost::core::typeinfo const& (*get_type)(); void (*static_delete)(void**); void (*destruct)(void**); void (*clone)(void* const*, void**); @@ -80,9 +83,9 @@ namespace boost { namespace spirit template<typename T, typename Char> struct type { - static boost::detail::sp_typeinfo const& get_type() + static boost::core::typeinfo const& get_type() { - return BOOST_SP_TYPEID(T); + return BOOST_CORE_TYPEID(T); } static void static_delete(void** x) { @@ -123,39 +126,39 @@ namespace boost { namespace spirit template<typename T, typename Char> struct type { - static boost::detail::sp_typeinfo const& get_type() + static boost::core::typeinfo const& get_type() { - return BOOST_SP_TYPEID(T); + return BOOST_CORE_TYPEID(T); } static void static_delete(void** x) { // destruct and free memory - delete (*reinterpret_cast<T**>(x)); + delete static_cast<T*>(*x); } static void destruct(void** x) { // destruct only, we'll reuse memory - (*reinterpret_cast<T**>(x))->~T(); + static_cast<T*>(*x)->~T(); } static void clone(void* const* src, void** dest) { - *dest = new T(**reinterpret_cast<T* const*>(src)); + *dest = new T(*static_cast<T const*>(*src)); } static void move(void* const* src, void** dest) { - **reinterpret_cast<T**>(dest) = - **reinterpret_cast<T* const*>(src); + *static_cast<T*>(*dest) = + *static_cast<T const*>(*src); } static std::basic_istream<Char>& stream_in(std::basic_istream<Char>& i, void** obj) { - i >> **reinterpret_cast<T**>(obj); + i >> *static_cast<T*>(*obj); return i; } static std::basic_ostream<Char>& stream_out(std::basic_ostream<Char>& o, void* const* obj) { - o << **reinterpret_cast<T* const*>(obj); + o << *static_cast<T const*>(*obj); return o; } }; @@ -341,7 +344,7 @@ namespace boost { namespace spirit return *this; } - boost::detail::sp_typeinfo const& type() const + boost::core::typeinfo const& type() const { return table->get_type(); } @@ -349,8 +352,8 @@ namespace boost { namespace spirit template <typename T> T const& cast() const { - if (type() != BOOST_SP_TYPEID(T)) - throw bad_any_cast(type(), BOOST_SP_TYPEID(T)); + if (type() != BOOST_CORE_TYPEID(T)) + throw bad_any_cast(type(), BOOST_CORE_TYPEID(T)); return spirit::detail::get_table<T>::is_small::value ? *reinterpret_cast<T const*>(&object) : @@ -413,7 +416,7 @@ namespace boost { namespace spirit template <typename T, typename Char> inline T* any_cast (basic_hold_any<Char>* operand) { - if (operand && operand->type() == BOOST_SP_TYPEID(T)) { + if (operand && operand->type() == BOOST_CORE_TYPEID(T)) { return spirit::detail::get_table<T>::is_small::value ? reinterpret_cast<T*>(&operand->object) : reinterpret_cast<T*>(operand->object); @@ -435,7 +438,7 @@ namespace boost { namespace spirit nonref* result = any_cast<nonref>(&operand); if(!result) - boost::throw_exception(bad_any_cast(operand.type(), BOOST_SP_TYPEID(T))); + boost::throw_exception(bad_any_cast(operand.type(), BOOST_CORE_TYPEID(T))); return *result; } diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/make_cons.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/make_cons.hpp index 0d6b0ae2c6..488f19c4cc 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/make_cons.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/make_cons.hpp @@ -12,8 +12,6 @@ #pragma once #endif -#include <boost/spirit/include/phoenix_limits.hpp> // needs to be included before proto -#include <boost/proto/proto.hpp> #include <boost/mpl/eval_if.hpp> #include <boost/fusion/include/cons.hpp> #include <boost/type_traits/remove_const.hpp> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/make_vector.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/make_vector.hpp index 92fb2c97c5..32a1eabaca 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/make_vector.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/make_vector.hpp @@ -4,12 +4,8 @@ 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) ==============================================================================*/ -#include <boost/version.hpp> - -// This is the same as the one in fusion in Boost 1.41. This is provided -// for compatibility with Boost 1.40 and below. - -#if (BOOST_VERSION > 104000) +#ifndef BOOST_SPIRIT_SUPPORT_DETAIL_MAKE_VECTOR_HPP +#define BOOST_SPIRIT_SUPPORT_DETAIL_MAKE_VECTOR_HPP #include <boost/fusion/include/make_vector.hpp> @@ -22,93 +18,4 @@ namespace boost { namespace spirit { namespace detail using fusion::make_vector; }}} -#else - -#ifndef BOOST_PP_IS_ITERATING -#if !defined(SPIRIT_MAKE_VECTOR_07162005_0243) -#define SPIRIT_MAKE_VECTOR_07162005_0243 - -#include <boost/preprocessor/iterate.hpp> -#include <boost/preprocessor/repetition/enum_params.hpp> -#include <boost/preprocessor/repetition/enum_binary_params.hpp> -#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> -#include <boost/preprocessor/repetition/repeat_from_to.hpp> -#include <boost/fusion/container/vector/vector.hpp> -#include <boost/fusion/support/detail/as_fusion_element.hpp> - -namespace boost { namespace fusion -{ - struct void_; -}} - -namespace boost { namespace spirit { namespace detail -{ - namespace result_of - { - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_VECTOR_SIZE, typename T, fusion::void_) - , typename Extra = fusion::void_ - > - struct make_vector; - - template <> - struct make_vector<> - { - typedef fusion::vector0 type; - }; - } - - inline fusion::vector0 - make_vector() - { - return fusion::vector0(); - } - -#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ - typename fusion::detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type - -#define BOOST_PP_FILENAME_1 <boost/spirit/home/support/detail/make_vector.hpp> -#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) -#include BOOST_PP_ITERATE() - -#undef BOOST_FUSION_AS_FUSION_ELEMENT - -}}} - -#endif -#else // defined(BOOST_PP_IS_ITERATING) -/////////////////////////////////////////////////////////////////////////////// -// -// Preprocessor vertical repetition code -// -/////////////////////////////////////////////////////////////////////////////// - -#define N BOOST_PP_ITERATION() - - namespace result_of - { - template <BOOST_PP_ENUM_PARAMS(N, typename T)> -#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) - #define TEXT(z, n, text) , text - struct make_vector< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, fusion::void_) > - #undef TEXT -#else - struct make_vector<BOOST_PP_ENUM_PARAMS(N, T)> #endif - { - typedef BOOST_PP_CAT(fusion::vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type; - }; - } - - template <BOOST_PP_ENUM_PARAMS(N, typename T)> - inline BOOST_PP_CAT(fusion::vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> - make_vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) - { - return BOOST_PP_CAT(fusion::vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>( - BOOST_PP_ENUM_PARAMS(N, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) -#endif // (BOOST_VERSION > 103800) diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/math/detail/fp_traits.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/math/detail/fp_traits.hpp deleted file mode 100644 index 199712a3b9..0000000000 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/math/detail/fp_traits.hpp +++ /dev/null @@ -1,583 +0,0 @@ -// fp_traits.hpp - -#ifndef BOOST_SPIRIT_MATH_FP_TRAITS_HPP -#define BOOST_SPIRIT_MATH_FP_TRAITS_HPP - -// Copyright (c) 2006 Johan Rade - -// 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) - -#if defined(__vms) && defined(__DECCXX) && !__IEEE_FLOAT -# error The VAX floating point mode on VMS is not supported. -#endif - -#if defined(_MSC_VER) -#pragma once -#endif - -#include <cstring> - -#include <boost/assert.hpp> -#include <boost/cstdint.hpp> -#include <boost/detail/endian.hpp> -#include <boost/static_assert.hpp> -#include <boost/type_traits/is_floating_point.hpp> - -//------------------------------------------------------------------------------ - -namespace boost { -namespace spirit { -namespace math { -namespace detail { - -//------------------------------------------------------------------------------ - -/* -Most processors support three different floating point precisions: -single precision (32 bits), double precision (64 bits) -and extended double precision (>64 bits) - -Note that the C++ type long double can be implemented -both as double precision and extended double precision. -*/ - -struct single_precision_tag {}; -struct double_precision_tag {}; -struct extended_double_precision_tag {}; - -//------------------------------------------------------------------------------ - -/* -template<class T, class U> struct fp_traits_impl; - - This is traits class that describes the binary structure of floating - point numbers of C++ type T and precision U - -Requirements: - - T = float, double or long double - U = single_precision_tag, double_precision_tag - or extended_double_precision_tag - -Typedef members: - - bits -- the target type when copying the leading bytes of a floating - point number. It is a typedef for uint32_t or uint64_t. - - coverage -- tells us whether all bytes are copied or not. - It is a typedef for all_bits or not_all_bits. - -Static data members: - - sign, exponent, flag, mantissa -- bit masks that give the meaning of the bits - in the leading bytes. - -Static function members: - - init() -- initializes the static data members, if needed. - (Is a no-op in the specialized versions of the template.) - - get_bits(), set_bits() -- provide access to the leading bytes. -*/ - -struct all_bits {}; -struct not_all_bits {}; - -// Generic version ------------------------------------------------------------- - -// The generic version uses run time initialization to determine the floating -// point format. It is capable of handling most formats, -// but not the Motorola 68K extended double precision format. - -// Currently the generic version is used only for extended double precision -// on Itanium. In all other cases there are specializations of the template -// that use compile time initialization. - -template<class T> struct uint32_t_coverage -{ - typedef not_all_bits type; -}; - -template<> struct uint32_t_coverage<single_precision_tag> -{ - typedef all_bits type; -}; - -template<class T, class U> struct fp_traits_impl -{ - typedef uint32_t bits; - typedef BOOST_DEDUCED_TYPENAME uint32_t_coverage<U>::type coverage; - - BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000); - static uint32_t exponent; - static uint32_t flag; - static uint32_t mantissa; - - static void init() - { - if(is_init_) return; - do_init_(); - is_init_ = true; - } - - static void get_bits(T x, uint32_t& a) - { - memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4); - } - - static void set_bits(T& x, uint32_t a) - { - memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4); - } - -private: - static size_t offset_; - static bool is_init_; - static void do_init_(); -}; - -//.............................................................................. - -template<class T, class U> uint32_t fp_traits_impl<T,U>::exponent; -template<class T, class U> uint32_t fp_traits_impl<T,U>::flag; -template<class T, class U> uint32_t fp_traits_impl<T,U>::mantissa; -template<class T, class U> size_t fp_traits_impl<T,U>::offset_; -template<class T, class U> bool fp_traits_impl<T,U>::is_init_; - -// In a single-threaded program, do_init will be called exactly once. -// In a multi-threaded program, do_init may be called simultaneously -// by more then one thread. That should not be a problem. - -//.............................................................................. - -template<class T, class U> void fp_traits_impl<T,U>::do_init_() -{ - T x = static_cast<T>(3) / static_cast<T>(4); - // sign bit = 0 - // exponent: first and last bit = 0, all other bits = 1 - // flag bit (if present) = 1 - // mantissa: first bit = 1, all other bits = 0 - - uint32_t a; - - for(size_t k = 0; k <= sizeof(T) - 4; ++k) { - - memcpy(&a, reinterpret_cast<unsigned char*>(&x) + k, 4); - - switch(a) { - - case 0x3f400000: // IEEE single precision format - - offset_ = k; - exponent = 0x7f800000; - flag = 0x00000000; - mantissa = 0x007fffff; - return; - - case 0x3fe80000: // IEEE double precision format - // and PowerPC extended double precision format - offset_ = k; - exponent = 0x7ff00000; - flag = 0x00000000; - mantissa = 0x000fffff; - return; - - case 0x3ffe0000: // Motorola extended double precision format - - // Must not get here. Must be handled by specialization. - // To get accurate cutoff between normals and subnormals - // we must use the flag bit that is in the 5th byte. - // Otherwise this cutoff will be off by a factor 2. - // If we do get here, then we have failed to detect the Motorola - // processor at compile time. - - BOOST_ASSERT(false && - "Failed to detect the Motorola processor at compile time"); - return; - - case 0x3ffe8000: // IEEE extended double precision format - // with 15 exponent bits - offset_ = k; - exponent = 0x7fff0000; - flag = 0x00000000; - mantissa = 0x0000ffff; - return; - - case 0x3ffec000: // Intel extended double precision format - - offset_ = k; - exponent = 0x7fff0000; - flag = 0x00008000; - mantissa = 0x00007fff; - return; - - default: - continue; - } - } - - BOOST_ASSERT(false); - - // Unknown format. -} - - -// float (32 bits) ------------------------------------------------------------- - -template<> struct fp_traits_impl<float, single_precision_tag> -{ - typedef uint32_t bits; - typedef all_bits coverage; - - BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000); - BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7f800000); - BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000); - BOOST_STATIC_CONSTANT(uint32_t, mantissa = 0x007fffff); - - static void init() {} - static void get_bits(float x, uint32_t& a) { memcpy(&a, &x, 4); } - static void set_bits(float& x, uint32_t a) { memcpy(&x, &a, 4); } -}; - - -// double (64 bits) ------------------------------------------------------------ - -#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) - -template<> struct fp_traits_impl<double, double_precision_tag> -{ - typedef uint32_t bits; - typedef not_all_bits coverage; - - BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000); - BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000); - BOOST_STATIC_CONSTANT(uint32_t, flag = 0); - BOOST_STATIC_CONSTANT(uint32_t, mantissa = 0x000fffff); - - static void init() {} - - static void get_bits(double x, uint32_t& a) - { - memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4); - } - - static void set_bits(double& x, uint32_t a) - { - memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4); - } - -private: - -#if defined(BOOST_BIG_ENDIAN) - BOOST_STATIC_CONSTANT(int, offset_ = 0); -#elif defined(BOOST_LITTLE_ENDIAN) - BOOST_STATIC_CONSTANT(int, offset_ = 4); -#else - BOOST_STATIC_ASSERT(false); -#endif -}; - -//.............................................................................. - -#else - -template<> struct fp_traits_impl<double, double_precision_tag> -{ - typedef uint64_t bits; - typedef all_bits coverage; - - static const uint64_t sign = (uint64_t)0x80000000 << 32; - static const uint64_t exponent = (uint64_t)0x7ff00000 << 32; - static const uint64_t flag = 0; - static const uint64_t mantissa - = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffff; - - static void init() {} - static void get_bits(double x, uint64_t& a) { memcpy(&a, &x, 8); } - static void set_bits(double& x, uint64_t a) { memcpy(&x, &a, 8); } -}; - -#endif - - -// long double (64 bits) ------------------------------------------------------- - -#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) - -template<> struct fp_traits_impl<long double, double_precision_tag> -{ - typedef uint32_t bits; - typedef not_all_bits coverage; - - BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000); - BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000); - BOOST_STATIC_CONSTANT(uint32_t, flag = 0); - BOOST_STATIC_CONSTANT(uint32_t, mantissa = 0x000fffff); - - static void init() {} - - static void get_bits(long double x, uint32_t& a) - { - memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4); - } - - static void set_bits(long double& x, uint32_t a) - { - memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4); - } - -private: - -#if defined(BOOST_BIG_ENDIAN) - BOOST_STATIC_CONSTANT(int, offset_ = 0); -#elif defined(BOOST_LITTLE_ENDIAN) - BOOST_STATIC_CONSTANT(int, offset_ = 4); -#else - BOOST_STATIC_ASSERT(false); -#endif -}; - -//.............................................................................. - -#else - -template<> struct fp_traits_impl<long double, double_precision_tag> -{ - typedef uint64_t bits; - typedef all_bits coverage; - - static const uint64_t sign = (uint64_t)0x80000000 << 32; - static const uint64_t exponent = (uint64_t)0x7ff00000 << 32; - static const uint64_t flag = 0; - static const uint64_t mantissa - = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffff; - - static void init() {} - static void get_bits(long double x, uint64_t& a) { memcpy(&a, &x, 8); } - static void set_bits(long double& x, uint64_t a) { memcpy(&x, &a, 8); } -}; - -#endif - - -// long double (>64 bits), x86 and x64 ----------------------------------------- - -#if defined(__i386) || defined(__i386__) || defined(_M_IX86) \ - || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) \ - || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) - -// Intel extended double precision format (80 bits) - -template<> struct fp_traits_impl<long double, extended_double_precision_tag> -{ - typedef uint32_t bits; - typedef not_all_bits coverage; - - BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000); - BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000); - BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000); - BOOST_STATIC_CONSTANT(uint32_t, mantissa = 0x00007fff); - - static void init() {} - - static void get_bits(long double x, uint32_t& a) - { - memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + 6, 4); - } - - static void set_bits(long double& x, uint32_t a) - { - memcpy(reinterpret_cast<unsigned char*>(&x) + 6, &a, 4); - } -}; - - -// long double (>64 bits), Itanium --------------------------------------------- - -#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64) - -// The floating point format is unknown at compile time -// No template specialization is provided. -// The generic definition is used. - -// The Itanium supports both -// the Intel extended double precision format (80 bits) and -// the IEEE extended double precision format with 15 exponent bits (128 bits). - - -// long double (>64 bits), PowerPC --------------------------------------------- - -#elif defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) \ - || defined(__ppc) || defined(__ppc__) || defined(__PPC__) - -// PowerPC extended double precision format (128 bits) - -template<> struct fp_traits_impl<long double, extended_double_precision_tag> -{ - typedef uint32_t bits; - typedef not_all_bits coverage; - - BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000); - BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000); - BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000); - BOOST_STATIC_CONSTANT(uint32_t, mantissa = 0x000fffff); - - static void init() {} - - static void get_bits(long double x, uint32_t& a) - { - memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4); - } - - static void set_bits(long double& x, uint32_t a) - { - memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4); - } - -private: - -#if defined(BOOST_BIG_ENDIAN) - BOOST_STATIC_CONSTANT(int, offset_ = 0); -#elif defined(BOOST_LITTLE_ENDIAN) - BOOST_STATIC_CONSTANT(int, offset_ = 12); -#else - BOOST_STATIC_ASSERT(false); -#endif -}; - - -// long double (>64 bits), Motorola 68K ---------------------------------------- - -#elif defined(__m68k) || defined(__m68k__) \ - || defined(__mc68000) || defined(__mc68000__) \ - -// Motorola extended double precision format (96 bits) - -// It is the same format as the Intel extended double precision format, -// except that 1) it is big-endian, 2) the 3rd and 4th byte are padding, and -// 3) the flag bit is not set for infinity - -template<> struct fp_traits_impl<long double, extended_double_precision_tag> -{ - typedef uint32_t bits; - typedef not_all_bits coverage; - - BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000); - BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000); - BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000); - BOOST_STATIC_CONSTANT(uint32_t, mantissa = 0x00007fff); - - static void init() {} - - // copy 1st, 2nd, 5th and 6th byte. 3rd and 4th byte are padding. - - static void get_bits(long double x, uint32_t& a) - { - memcpy(&a, &x, 2); - memcpy(reinterpret_cast<unsigned char*>(&a) + 2, - reinterpret_cast<const unsigned char*>(&x) + 4, 2); - } - - static void set_bits(long double& x, uint32_t a) - { - memcpy(&x, &a, 2); - memcpy(reinterpret_cast<unsigned char*>(&x) + 4, - reinterpret_cast<const unsigned char*>(&a) + 2, 2); - } -}; - - -// long double (>64 bits), All other processors -------------------------------- - -#else - -// IEEE extended double precision format with 15 exponent bits (128 bits) - -template<> struct fp_traits_impl<long double, extended_double_precision_tag> -{ - typedef uint32_t bits; - typedef not_all_bits coverage; - - BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000); - BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000); - BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000); - BOOST_STATIC_CONSTANT(uint32_t, mantissa = 0x0000ffff); - - static void init() {} - - static void get_bits(long double x, uint32_t& a) - { - memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4); - } - - static void set_bits(long double& x, uint32_t a) - { - memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4); - } - -private: - -#if defined(BOOST_BIG_ENDIAN) - BOOST_STATIC_CONSTANT(int, offset_ = 0); -#elif defined(BOOST_LITTLE_ENDIAN) - BOOST_STATIC_CONSTANT(int, offset_ = 12); -#else - BOOST_STATIC_ASSERT(false); -#endif -}; - -#endif - - -//------------------------------------------------------------------------------ - -// size_to_precision is a type switch for converting a C++ floating point type -// to the corresponding precision type. - -template<int n> struct size_to_precision; - -template<> struct size_to_precision<4> -{ - typedef single_precision_tag type; -}; - -template<> struct size_to_precision<8> -{ - typedef double_precision_tag type; -}; - -template<> struct size_to_precision<10> -{ - typedef extended_double_precision_tag type; -}; - -template<> struct size_to_precision<12> -{ - typedef extended_double_precision_tag type; -}; - -template<> struct size_to_precision<16> -{ - typedef extended_double_precision_tag type; -}; - -// fp_traits is a type switch that selects the right fp_traits_impl - -template<class T> struct fp_traits -{ - BOOST_STATIC_ASSERT(boost::is_floating_point<T>::value); - typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T)>::type precision; - typedef fp_traits_impl<T, precision> type; -}; - - -//------------------------------------------------------------------------------ - -} // namespace detail -} // namespace math -} // namespace spirit -} // namespace boost - -#endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/math/fpclassify.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/math/fpclassify.hpp deleted file mode 100644 index 3659ec85ea..0000000000 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/math/fpclassify.hpp +++ /dev/null @@ -1,235 +0,0 @@ -// fpclassify.hpp - -#ifndef BOOST_SPIRIT_MATH_FPCLASSIFY_HPP -#define BOOST_SPIRIT_MATH_FPCLASSIFY_HPP - -// Copyright (c) 2006 Johan Rade - -// 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) - -/* -The following algorithm is used: - - If all exponent bits, the flag bit (if there is one), - and all mantissa bits are 0, then the number is zero. - - If all exponent bits and the flag bit (if there is one) are 0, - and at least one mantissa bit is 1, then the number is subnormal. - - If all exponent bits are 1 and all mantissa bits are 0, - then the number is infinity. - - If all exponent bits are 1 and at least one mantissa bit is 1, - then the number is a not-a-number. - - Otherwise the number is normal. - -(Note that the binary representation of infinity -has flag bit 0 for Motorola 68K extended double precision, -and flag bit 1 for Intel extended double precision.) - -To get the bits, the four or eight most significant bytes are copied -into an uint32_t or uint64_t and bit masks are applied. -This covers all the exponent bits and the flag bit (if there is one), -but not always all the mantissa bits. -Some of the functions below have two implementations, -depending on whether all the mantissa bits are copied or not. -*/ - -#if defined(_MSC_VER) -#pragma once -#endif - -#include <cmath> - -#ifndef FP_INFINITE -# define FP_INFINITE 0 -# define FP_NAN 1 -# define FP_NORMAL 2 -# define FP_SUBNORMAL 3 -# define FP_ZERO 4 -#endif - -#include <boost/spirit/home/support/detail/math/detail/fp_traits.hpp> - -namespace boost { -namespace spirit { -namespace math { - -//------------------------------------------------------------------------------ - -template<class T> bool (isfinite)(T x) -{ - typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits; - traits::init(); - - BOOST_DEDUCED_TYPENAME traits::bits a; - traits::get_bits(x,a); - a &= traits::exponent; - return a != traits::exponent; -} - -//------------------------------------------------------------------------------ - -template<class T> bool (isnormal)(T x) -{ - typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits; - traits::init(); - - BOOST_DEDUCED_TYPENAME traits::bits a; - traits::get_bits(x,a); - a &= traits::exponent | traits::flag; - return (a != 0) && (a < traits::exponent); -} - -//------------------------------------------------------------------------------ - -namespace detail { - - template<class T> bool isinf_impl(T x, all_bits) - { - typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits; - - BOOST_DEDUCED_TYPENAME traits::bits a; - traits::get_bits(x,a); - a &= traits::exponent | traits::mantissa; - return a == traits::exponent; - } - - template<class T> bool isinf_impl(T x, not_all_bits) - { - typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits; - - BOOST_DEDUCED_TYPENAME traits::bits a; - traits::get_bits(x,a); - a &= traits::exponent | traits::mantissa; - if(a != traits::exponent) - return false; - - traits::set_bits(x,0); - return x == 0; - } - -} // namespace detail - -template<class T> bool (isinf)(T x) -{ - typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits; - traits::init(); - return detail::isinf_impl(x, BOOST_DEDUCED_TYPENAME traits::coverage()); -} - -//------------------------------------------------------------------------------ - -namespace detail { - - template<class T> bool isnan_impl(T x, all_bits) - { - typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits; - traits::init(); - - BOOST_DEDUCED_TYPENAME traits::bits a; - traits::get_bits(x,a); - a &= traits::exponent | traits::mantissa; - return a > traits::exponent; - } - - template<class T> bool isnan_impl(T x, not_all_bits) - { - typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits; - traits::init(); - - BOOST_DEDUCED_TYPENAME traits::bits a; - traits::get_bits(x,a); - - a &= traits::exponent | traits::mantissa; - if(a < traits::exponent) - return false; - - a &= traits::mantissa; - traits::set_bits(x,a); - return x != 0; - } - -} // namespace detail - -template<class T> bool (isnan)(T x) -{ - typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits; - traits::init(); - return detail::isnan_impl(x, BOOST_DEDUCED_TYPENAME traits::coverage()); -} - -//------------------------------------------------------------------------------ - -namespace detail { - - template<class T> int fpclassify_impl(T x, all_bits) - { - typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits; - - BOOST_DEDUCED_TYPENAME traits::bits a; - traits::get_bits(x,a); - a &= traits::exponent | traits::flag | traits::mantissa; - - if(a <= traits::mantissa) { - if(a == 0) - return FP_ZERO; - else - return FP_SUBNORMAL; - } - - if(a < traits::exponent) - return FP_NORMAL; - - a &= traits::mantissa; - if(a == 0) - return FP_INFINITE; - - return FP_NAN; - } - - template<class T> int fpclassify_impl(T x, not_all_bits) - { - typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits; - - BOOST_DEDUCED_TYPENAME traits::bits a; - traits::get_bits(x,a); - a &= traits::exponent | traits::flag | traits::mantissa; - - if(a <= traits::mantissa) { - if(x == 0) - return FP_ZERO; - else - return FP_SUBNORMAL; - } - - if(a < traits::exponent) - return FP_NORMAL; - - a &= traits::mantissa; - traits::set_bits(x,a); - if(x == 0) - return FP_INFINITE; - - return FP_NAN; - } - -} // namespace detail - -template<class T> int (fpclassify)(T x) -{ - typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits; - traits::init(); - return detail::fpclassify_impl(x, BOOST_DEDUCED_TYPENAME traits::coverage()); -} - -//------------------------------------------------------------------------------ - -} // namespace math -} // namespace spirit -} // namespace boost - -#endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/math/signbit.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/math/signbit.hpp deleted file mode 100644 index 045fc3a8f0..0000000000 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/math/signbit.hpp +++ /dev/null @@ -1,92 +0,0 @@ -// signbit.hpp - -#ifndef BOOST_SPIRIT_MATH_SIGNBIT_HPP -#define BOOST_SPIRIT_MATH_SIGNBIT_HPP - -// Copyright (c) 2006 Johan Rade - -// 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) - -#if defined(_MSC_VER) -#pragma once -#endif - -#include <boost/spirit/home/support/detail/math/detail/fp_traits.hpp> - -namespace boost { -namespace spirit { -namespace math { - -//------------------------------------------------------------------------------ - -template<class T> bool (signbit)(T x) -{ - typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits; - traits::init(); - - BOOST_DEDUCED_TYPENAME traits::bits a; - traits::get_bits(x,a); - a &= traits::sign; - return a != 0; -} - -//------------------------------------------------------------------------------ - -namespace detail { - - template<class T> T copysign_impl(T x, T y) - { - typedef BOOST_DEDUCED_TYPENAME fp_traits<T>::type traits; - traits::init(); - - BOOST_DEDUCED_TYPENAME traits::bits a; - traits::get_bits(x,a); - a &= ~traits::sign; - - BOOST_DEDUCED_TYPENAME traits::bits b; - traits::get_bits(y,b); - b &= traits::sign; - - traits::set_bits(x,a|b); - return x; - } -} - -inline float (copysign)(float x, float y) // magnitude of x and sign of y -{ - return detail::copysign_impl(x,y); -} - -inline double (copysign)(double x, double y) -{ - return detail::copysign_impl(x,y); -} - -inline long double (copysign)(long double x, long double y) -{ - return detail::copysign_impl(x,y); -} - -//------------------------------------------------------------------------------ - -template<class T> T (changesign)(T x) -{ - typedef BOOST_DEDUCED_TYPENAME detail::fp_traits<T>::type traits; - traits::init(); - - BOOST_DEDUCED_TYPENAME traits::bits a; - traits::get_bits(x,a); - a ^= traits::sign; - traits::set_bits(x,a); - return x; -} - -//------------------------------------------------------------------------------ - -} // namespace math -} // namespace spirit -} // namespace boost - -#endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/pow10.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/pow10.hpp index e21a4dc571..4559d7d939 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/pow10.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/pow10.hpp @@ -6,8 +6,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_POW10_DECEMBER_26_2008_1118AM) -#define SPIRIT_POW10_DECEMBER_26_2008_1118AM +#ifndef BOOST_SPIRIT_SUPPORT_DETAIL_POW10_HPP +#define BOOST_SPIRIT_SUPPORT_DETAIL_POW10_HPP #if defined(_MSC_VER) #pragma once diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/scoped_enum_emulation.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/scoped_enum_emulation.hpp index 1b35043f89..4fa9f9240c 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/scoped_enum_emulation.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/scoped_enum_emulation.hpp @@ -14,7 +14,9 @@ #include <boost/version.hpp> #include <boost/config.hpp> -#if BOOST_VERSION >= 104000 +#if BOOST_VERSION >= 105600 +# include <boost/core/scoped_enum.hpp> +#elif BOOST_VERSION >= 104000 # include <boost/detail/scoped_enum_emulation.hpp> #else # if !defined(BOOST_NO_CXX11_SCOPED_ENUMS) diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/sign.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/sign.hpp deleted file mode 100644 index 7c1bfb06c7..0000000000 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/sign.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2001-2011 Hartmut Kaiser - http://spirit.sourceforge.net/ - - 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) -=============================================================================*/ -#if !defined(SPIRIT_SIGN_MAR_11_2009_0734PM) -#define SPIRIT_SIGN_MAR_11_2009_0734PM - -#if defined(_MSC_VER) -#pragma once -#endif - -#include <boost/config/no_tr1/cmath.hpp> -#include <boost/version.hpp> -#if BOOST_VERSION < 104000 -#include <boost/spirit/home/support/detail/math/fpclassify.hpp> -#include <boost/spirit/home/support/detail/math/signbit.hpp> -#else -#include <boost/math/special_functions/fpclassify.hpp> -#include <boost/math/special_functions/sign.hpp> -#endif - -namespace boost { namespace spirit { namespace detail -{ -#if BOOST_VERSION < 104000 - // signbit(-NAN) is broken for versions of Boost earlier than 1.40.0 - // This routine has been taken and adapted from Johan Rade's fp_traits - // library - template<typename T> - inline bool (signbit)(T x) - { - return (boost::spirit::math::signbit)(x); - } - - template<typename T> - inline T (changesign)(T x) - { - return (boost::spirit::math::changesign)(x); - } -#else - template<typename T> - inline bool (signbit)(T x) - { - return (boost::math::signbit)(x) ? true : false; - } - - // This routine has been taken and adapted from Johan Rade's fp_traits - // library - template<typename T> - inline T (changesign)(T x) - { -#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) - return -x; -#else - typedef typename math::detail::fp_traits<T>::type traits_type; - - typename traits_type::bits a; - traits_type::get_bits(x, a); - a ^= traits_type::sign; - traits_type::set_bits(x, a); - return x; -#endif - } -#endif - -}}} - -#endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/what_function.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/what_function.hpp index c256cd86e8..e4b7a19998 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/what_function.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/detail/what_function.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_WHAT_FUNCTION_APRIL_22_2007_0236PM) -#define SPIRIT_WHAT_FUNCTION_APRIL_22_2007_0236PM +#ifndef BOOST_SPIRIT_SUPPORT_DETAIL_WHAT_FUNCTION_HPP +#define BOOST_SPIRIT_SUPPORT_DETAIL_WHAT_FUNCTION_HPP #if defined(_MSC_VER) #pragma once @@ -30,7 +30,7 @@ namespace boost { namespace spirit { namespace detail void operator()(Component const& component) const { #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600)) - component; // suppresses warning: C4100: 'component' : unreferenced formal parameter + (void)component; // suppresses warning: C4100: 'component' : unreferenced formal parameter #endif boost::get<std::list<info> >(what.value). push_back(component.what(context)); @@ -40,7 +40,7 @@ namespace boost { namespace spirit { namespace detail Context& context; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(what_function& operator= (what_function const&)); + BOOST_DELETED_FUNCTION(what_function& operator= (what_function const&)) }; }}} diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/info.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/info.hpp index 099772bfc6..a433176b0f 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/info.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/info.hpp @@ -14,7 +14,6 @@ #include <boost/variant/variant.hpp> #include <boost/variant/recursive_variant.hpp> #include <boost/variant/apply_visitor.hpp> -#include <boost/foreach.hpp> #include <boost/spirit/home/support/utf8.hpp> #include <list> #include <iterator> @@ -106,10 +105,11 @@ namespace boost { namespace spirit void operator()(std::list<info> const& l) const { callback.element(tag, "", depth); - BOOST_FOREACH(info const& what, l) + for (std::list<info>::const_iterator it = l.begin(), + end = l.end(); it != end; ++it) { boost::apply_visitor( - this_type(callback, what.tag, depth+1), what.value); + this_type(callback, it->tag, depth+1), it->value); } } @@ -118,7 +118,7 @@ namespace boost { namespace spirit int depth; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(basic_info_walker& operator= (basic_info_walker const&)); + BOOST_DELETED_FUNCTION(basic_info_walker& operator= (basic_info_walker const&)) }; // bare-bones print support @@ -132,7 +132,7 @@ namespace boost { namespace spirit void element(string const& tag, string const& value, int /*depth*/) const { - if (value == "") + if (value.empty()) out << '<' << tag << '>'; else out << '"' << value << '"'; @@ -141,7 +141,7 @@ namespace boost { namespace spirit Out& out; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(simple_printer& operator= (simple_printer const&)); + BOOST_DELETED_FUNCTION(simple_printer& operator= (simple_printer const&)) }; template <typename Out> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/lazy.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/lazy.hpp index 5af98466ca..9faa8e28bd 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/lazy.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/lazy.hpp @@ -11,10 +11,15 @@ #pragma once #endif -#include <boost/spirit/include/phoenix_core.hpp> -#include <boost/proto/proto.hpp> #include <boost/spirit/home/support/modify.hpp> #include <boost/spirit/home/support/detail/is_spirit_tag.hpp> +#include <boost/proto/traits.hpp> + +namespace boost { namespace phoenix +{ + template <typename Expr> + struct actor; +}} namespace boost { namespace spirit { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/limits.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/limits.hpp index 8abb4f1400..563ce5694b 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/limits.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/limits.hpp @@ -10,7 +10,7 @@ #pragma once #endif -#include <boost/spirit/include/phoenix_core.hpp> +#include <boost/phoenix/core/limits.hpp> #if !defined(SPIRIT_ARGUMENTS_LIMIT) # define SPIRIT_ARGUMENTS_LIMIT BOOST_PHOENIX_LIMIT diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/make_component.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/make_component.hpp index 3868475c6e..0a8c39152b 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/make_component.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/make_component.hpp @@ -12,10 +12,13 @@ #pragma once #endif -#include <boost/spirit/include/phoenix_core.hpp> -#include <boost/proto/proto.hpp> #include <boost/spirit/home/support/detail/make_cons.hpp> #include <boost/spirit/home/support/modify.hpp> +#include <boost/phoenix/core/actor.hpp> +#include <boost/phoenix/core/is_actor.hpp> +#include <boost/proto/tags.hpp> +#include <boost/proto/traits.hpp> +#include <boost/proto/transform.hpp> namespace boost { namespace spirit { diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/meta_compiler.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/meta_compiler.hpp index a525ef362d..b490755782 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/meta_compiler.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/meta_compiler.hpp @@ -13,16 +13,17 @@ #endif #include <boost/config.hpp> -#include <boost/spirit/include/phoenix_limits.hpp> #include <boost/detail/workaround.hpp> -#include <boost/spirit/include/phoenix_limits.hpp> // needs to be included before proto -#include <boost/proto/proto.hpp> #include <boost/spirit/home/support/make_component.hpp> #include <boost/spirit/home/support/modify.hpp> #include <boost/spirit/home/support/detail/make_cons.hpp> #include <boost/spirit/home/support/unused.hpp> #include <boost/spirit/home/support/assert_msg.hpp> -#include <boost/utility/enable_if.hpp> +#include <boost/core/enable_if.hpp> +#include <boost/proto/matches.hpp> +#include <boost/proto/tags.hpp> +#include <boost/proto/traits.hpp> +#include <boost/proto/proto_fwd.hpp> // for transform placeholders #include <boost/type_traits/remove_reference.hpp> namespace boost { namespace spirit diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/modify.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/modify.hpp index 80d2f71b71..a8777924b8 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/modify.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/modify.hpp @@ -12,9 +12,6 @@ #pragma once #endif -#include <boost/spirit/include/phoenix_limits.hpp> // needs to be included before proto -#include <boost/proto/proto.hpp> -#include <boost/mpl/if.hpp> #include <boost/type_traits/is_base_of.hpp> #include <boost/spirit/home/support/unused.hpp> @@ -71,6 +68,8 @@ namespace boost { namespace spirit template <typename Domain, typename Enable = void> struct modify { + typedef void proto_is_callable_; + template <typename Sig> struct result; @@ -114,11 +113,4 @@ namespace boost { namespace spirit }; }} -namespace boost { namespace proto -{ - template <typename Domain, typename Enable> - struct is_callable<spirit::modify<Domain, Enable> > - : mpl::true_ {}; -}} - #endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/nonterminal/expand_arg.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/nonterminal/expand_arg.hpp index f3809f1dc8..32400e6826 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/nonterminal/expand_arg.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/nonterminal/expand_arg.hpp @@ -79,7 +79,7 @@ namespace boost { namespace spirit { namespace detail Context& context; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(expand_arg& operator= (expand_arg const&)); + BOOST_DELETED_FUNCTION(expand_arg& operator= (expand_arg const&)) expand_arg(const expand_arg&) = default; }; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/numeric_traits.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/numeric_traits.hpp index 01771dd982..9e03fe06f7 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/numeric_traits.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/numeric_traits.hpp @@ -11,9 +11,8 @@ #endif #include <boost/config.hpp> +#include <boost/limits.hpp> #include <boost/mpl/bool.hpp> -#include <boost/integer_traits.hpp> -#include <boost/utility/enable_if.hpp> namespace boost { namespace spirit { namespace traits { @@ -115,13 +114,9 @@ namespace boost { namespace spirit { namespace traits template <typename T, typename Enable = void> struct is_infinite; - + template <typename T, typename Enable = void> - struct check_overflow : mpl::false_ {}; - - template <typename T> - struct check_overflow<T, typename enable_if_c<integer_traits<T>::is_integral>::type> - : mpl::true_ {}; + struct check_overflow : mpl::bool_<std::numeric_limits<T>::is_bounded> {}; }}} #endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/sequence_base_id.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/sequence_base_id.hpp index df9c177698..d2f72148d4 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/sequence_base_id.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/sequence_base_id.hpp @@ -4,8 +4,8 @@ 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) =============================================================================*/ -#if !defined(SPIRIT_SEQUENCE_BASE_ID_MAR_15_2009_1243PM) -#define SPIRIT_SEQUENCE_BASE_ID_MAR_15_2009_1243PM +#ifndef BOOST_SPIRIT_SUPPORT_SEQUENCE_BASE_ID_HPP +#define BOOST_SPIRIT_SUPPORT_SEQUENCE_BASE_ID_HPP #if defined(_MSC_VER) #pragma once diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/string_traits.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/string_traits.hpp index f970012b44..f890cf962b 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/string_traits.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/string_traits.hpp @@ -18,7 +18,7 @@ #include <boost/mpl/bool.hpp> #include <boost/mpl/identity.hpp> #include <boost/mpl/if.hpp> -#include <boost/proto/proto_fwd.hpp> +#include <boost/proto/proto_fwd.hpp> // for BOOST_PROTO_DISABLE_IF_IS_CONST #include <boost/type_traits/is_const.hpp> #if defined(__GNUC__) && (__GNUC__ < 4) #include <boost/type_traits/add_const.hpp> diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/terminal.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/terminal.hpp index f1bc91ac0c..ca11e5f1e2 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/terminal.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/terminal.hpp @@ -14,16 +14,19 @@ #endif #include <boost/config.hpp> -#include <boost/spirit/include/phoenix_core.hpp> -#include <boost/spirit/include/phoenix_function.hpp> -#include <boost/proto/proto.hpp> #include <boost/spirit/home/support/meta_compiler.hpp> #include <boost/spirit/home/support/detail/make_vector.hpp> #include <boost/spirit/home/support/unused.hpp> #include <boost/spirit/home/support/detail/is_spirit_tag.hpp> -#include <boost/preprocessor/tuple/elem.hpp> - #include <boost/spirit/home/support/terminal_expression.hpp> +#include <boost/phoenix/core/as_actor.hpp> +#include <boost/phoenix/core/is_actor.hpp> +#include <boost/phoenix/core/terminal_fwd.hpp> +#include <boost/phoenix/core/value.hpp> // includes as_actor specialization +#include <boost/phoenix/function/function.hpp> +#include <boost/preprocessor/tuple/elem.hpp> +#include <boost/proto/extends.hpp> +#include <boost/proto/traits.hpp> namespace boost { namespace spirit { @@ -486,7 +489,7 @@ namespace boost { namespace spirit } // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(terminal& operator= (terminal const&)); + BOOST_DELETED_FUNCTION(terminal& operator= (terminal const&)) terminal(const terminal&) = default; }; @@ -544,7 +547,7 @@ namespace boost { namespace spirit data_type data_; // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(stateful_tag& operator= (stateful_tag const&)); + BOOST_DELETED_FUNCTION(stateful_tag& operator= (stateful_tag const&)) stateful_tag(const stateful_tag&) = default; }; } @@ -563,7 +566,7 @@ namespace boost { namespace spirit {} // silence MSVC warning C4512: assignment operator could not be generated - BOOST_DELETED_FUNCTION(stateful_tag_type& operator= (stateful_tag_type const&)); + BOOST_DELETED_FUNCTION(stateful_tag_type& operator= (stateful_tag_type const&)) }; namespace detail diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/unused.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/unused.hpp index 0f15081b4b..f8e4323169 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/unused.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/unused.hpp @@ -12,6 +12,7 @@ #pragma once #endif +#include <boost/config.hpp> #include <boost/mpl/bool.hpp> /////////////////////////////////////////////////////////////////////////////// @@ -25,9 +26,7 @@ namespace boost { namespace spirit /////////////////////////////////////////////////////////////////////////// struct unused_type { - unused_type() - { - } + BOOST_DEFAULTED_FUNCTION(unused_type(), {}) unused_type(const unused_type& a) = default; diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/utf8.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/utf8.hpp index c4883428b1..59fcb9881e 100644 --- a/contrib/restricted/boost/spirit/include/boost/spirit/home/support/utf8.hpp +++ b/contrib/restricted/boost/spirit/include/boost/spirit/home/support/utf8.hpp @@ -12,9 +12,9 @@ #endif #include <boost/cstdint.hpp> -#include <boost/foreach.hpp> #include <boost/regex/pending/unicode_iterator.hpp> #include <boost/type_traits/make_unsigned.hpp> +#include <iterator> #include <string> namespace boost { namespace spirit @@ -61,12 +61,51 @@ namespace boost { namespace spirit insert_iter out_iter(result); utf8_output_iterator<insert_iter> utf8_iter(out_iter); typedef typename make_unsigned<Char>::type UChar; - BOOST_FOREACH(Char ch, str) + for (Char const* ptr = str.data(), + * end = ptr + str.size(); ptr < end; ++ptr) { - *utf8_iter++ = (UChar)ch; + *utf8_iter++ = (UChar)*ptr; } return result; } + + // Assume wchar_t content is UTF-16 on MSVC, or mingw/wineg++ with -fshort-wchar +#if defined(_MSC_VER) || defined(__SIZEOF_WCHAR_T__) && __SIZEOF_WCHAR_T__ == 2 + inline utf8_string to_utf8(wchar_t value) + { + utf8_string result; + typedef std::back_insert_iterator<utf8_string> insert_iter; + insert_iter out_iter(result); + utf8_output_iterator<insert_iter> utf8_iter(out_iter); + + u16_to_u32_iterator<wchar_t const*, ucs4_char> ucs4_iter(&value); + *utf8_iter++ = *ucs4_iter; + + return result; + } + + inline utf8_string to_utf8(wchar_t const* str) + { + utf8_string result; + typedef std::back_insert_iterator<utf8_string> insert_iter; + insert_iter out_iter(result); + utf8_output_iterator<insert_iter> utf8_iter(out_iter); + + u16_to_u32_iterator<wchar_t const*, ucs4_char> ucs4_iter(str); + for (ucs4_char c; (c = *ucs4_iter) != ucs4_char(); ++ucs4_iter) { + *utf8_iter++ = c; + } + + return result; + } + + template <typename Traits, typename Allocator> + inline utf8_string + to_utf8(std::basic_string<wchar_t, Traits, Allocator> const& str) + { + return to_utf8(str.c_str()); + } +#endif }} #endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/include/phoenix_core.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/include/phoenix_core.hpp deleted file mode 100644 index d08ed06687..0000000000 --- a/contrib/restricted/boost/spirit/include/boost/spirit/include/phoenix_core.hpp +++ /dev/null @@ -1,12 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2001-2011 Hartmut Kaiser - http://spirit.sourceforge.net/ - - 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) -=============================================================================*/ -#ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_CORE -#define BOOST_SPIRIT_INCLUDE_PHOENIX_CORE -#include <boost/phoenix/core.hpp> -#endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/include/phoenix_function.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/include/phoenix_function.hpp deleted file mode 100644 index 6ab828f53b..0000000000 --- a/contrib/restricted/boost/spirit/include/boost/spirit/include/phoenix_function.hpp +++ /dev/null @@ -1,12 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2001-2011 Hartmut Kaiser - http://spirit.sourceforge.net/ - - 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) -=============================================================================*/ -#ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_FUNCTION -#define BOOST_SPIRIT_INCLUDE_PHOENIX_FUNCTION -#include <boost/phoenix/function.hpp> -#endif diff --git a/contrib/restricted/boost/spirit/include/boost/spirit/include/phoenix_limits.hpp b/contrib/restricted/boost/spirit/include/boost/spirit/include/phoenix_limits.hpp deleted file mode 100644 index 93a1e1ef90..0000000000 --- a/contrib/restricted/boost/spirit/include/boost/spirit/include/phoenix_limits.hpp +++ /dev/null @@ -1,12 +0,0 @@ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2001-2011 Hartmut Kaiser - http://spirit.sourceforge.net/ - - 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) -=============================================================================*/ -#ifndef BOOST_SPIRIT_INCLUDE_PHOENIX_LIMITS -#define BOOST_SPIRIT_INCLUDE_PHOENIX_LIMITS -#include <boost/phoenix/core/limits.hpp> -#endif |