diff --git a/Builds/VisualStudio2015/RippleD.vcxproj b/Builds/VisualStudio2015/RippleD.vcxproj index 5b20f7352..e133f846a 100644 --- a/Builds/VisualStudio2015/RippleD.vcxproj +++ b/Builds/VisualStudio2015/RippleD.vcxproj @@ -1,4 +1,4 @@ - + {26B7D9AC-1A80-8EF8-6703-D061F1BECB75} @@ -380,26 +380,8 @@ True - - - - - - True - - - - - - - - - True - - - diff --git a/Builds/VisualStudio2015/RippleD.vcxproj.filters b/Builds/VisualStudio2015/RippleD.vcxproj.filters index 57854a358..f95a17717 100644 --- a/Builds/VisualStudio2015/RippleD.vcxproj.filters +++ b/Builds/VisualStudio2015/RippleD.vcxproj.filters @@ -1,4 +1,4 @@ - + @@ -52,9 +52,6 @@ {A3DFF000-1717-AE18-DD13-75DC3A36F594} - - {96F8CA0B-80D3-8AEA-EE13-B39EE1CF91B0} - {FE3C8FFD-FEE1-BDEA-DE7F-24A8DEDCAD20} @@ -861,6 +858,7 @@ beast\crypto\tests +<<<<<<< HEAD beast\cxx14 @@ -888,6 +886,11 @@ beast\cxx14 +======= + + beast\cxx14 + +>>>>>>> eb8aa75... Workaround for is_constructable with std::pair beast\hash diff --git a/src/beast/beast/asio/bind_handler.h b/src/beast/beast/asio/bind_handler.h index b536db6e6..22c3855c1 100644 --- a/src/beast/beast/asio/bind_handler.h +++ b/src/beast/beast/asio/bind_handler.h @@ -25,8 +25,8 @@ #include #include -#include // -#include // +#include +#include namespace beast { namespace asio { diff --git a/src/beast/beast/asio/streambuf.h b/src/beast/beast/asio/streambuf.h index 1a5a35755..ae39ec2b6 100644 --- a/src/beast/beast/asio/streambuf.h +++ b/src/beast/beast/asio/streambuf.h @@ -28,7 +28,7 @@ #include #include #include -#include // +#include #include #include diff --git a/src/beast/beast/asio/waitable_executor.h b/src/beast/beast/asio/waitable_executor.h index 902250b10..7695a8fa5 100644 --- a/src/beast/beast/asio/waitable_executor.h +++ b/src/beast/beast/asio/waitable_executor.h @@ -27,7 +27,7 @@ #include #include #include -#include // +#include #include #include diff --git a/src/beast/beast/container/buffer_view.h b/src/beast/beast/container/buffer_view.h index c153ca930..b61e8d703 100644 --- a/src/beast/beast/container/buffer_view.h +++ b/src/beast/beast/container/buffer_view.h @@ -28,8 +28,8 @@ #include #include #include +#include #include -#include // namespace beast { diff --git a/src/beast/beast/container/detail/aged_ordered_container.h b/src/beast/beast/container/detail/aged_ordered_container.h index 73b88aade..65418f7c6 100644 --- a/src/beast/beast/container/detail/aged_ordered_container.h +++ b/src/beast/beast/container/detail/aged_ordered_container.h @@ -25,15 +25,17 @@ #include #include #include +#include +#include #include #include #include -#include // +#include #include #include #include #include -#include // +#include #include namespace beast { diff --git a/src/beast/beast/container/detail/aged_unordered_container.h b/src/beast/beast/container/detail/aged_unordered_container.h index cffa6ea77..52499f8b1 100644 --- a/src/beast/beast/container/detail/aged_unordered_container.h +++ b/src/beast/beast/container/detail/aged_unordered_container.h @@ -27,12 +27,12 @@ #include #include #include -#include // +#include #include #include #include #include -#include // +#include #include /* diff --git a/src/beast/beast/cxx14/algorithm.h b/src/beast/beast/cxx14/algorithm.h deleted file mode 100644 index 49e906c44..000000000 --- a/src/beast/beast/cxx14/algorithm.h +++ /dev/null @@ -1,94 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_CXX14_ALGORITHM_H_INCLUDED -#define BEAST_CXX14_ALGORITHM_H_INCLUDED - -#include -#include - -#include - -#if ! BEAST_NO_CXX14_EQUAL - -namespace std { - -namespace detail { - -template -bool equal (FwdIt1 first1, FwdIt1 last1, - FwdIt2 first2, FwdIt2 last2, Pred pred, - std::input_iterator_tag, std::input_iterator_tag) -{ - for (; first1 != last1 && first2 != last2; ++first1, ++first2) - if (! pred (*first1, *first2)) - return false; - return first1 == last1 && first2 == last2; -} - -template -bool equal (RanIt1 first1, RanIt1 last1, - RanIt2 first2, RanIt2 last2, Pred pred, - random_access_iterator_tag, - random_access_iterator_tag ) -{ - if (std::distance (first1, last1) != - std::distance (first2, last2)) - return false; - for (; first1 != last1; ++first1, ++first2) - if (! pred (*first1, *first2)) - return false; - return true; -} - -} - -/** C++14 implementation of std::equal. */ -/** @{ */ -template -bool equal (FwdIt1 first1, FwdIt1 last1, - FwdIt2 first2, FwdIt2 last2) -{ - return std::detail::equal (first1, last1, - first2, last2, std::equal_to (), - typename std::iterator_traits < - FwdIt1>::iterator_category(), - typename std::iterator_traits < - FwdIt2>::iterator_category()); -} - -template -bool equal (FwdIt1 first1, FwdIt1 last1, - FwdIt2 first2, FwdIt2 last2, Pred pred) -{ - return std::detail::equal < - typename std::add_lvalue_reference ::type> ( - first1, last1, first2, last2, pred, - typename std::iterator_traits < - FwdIt1>::iterator_category(), - typename std::iterator_traits < - FwdIt2>::iterator_category()); -} -/** @} */ - -} - -#endif - -#endif diff --git a/src/beast/beast/cxx14/config.h b/src/beast/beast/cxx14/config.h deleted file mode 100644 index cb1f0a887..000000000 --- a/src/beast/beast/cxx14/config.h +++ /dev/null @@ -1,90 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_CXX14_CONFIG_H_INCLUDED -#define BEAST_CXX14_CONFIG_H_INCLUDED - -#include // detect libc++ verison - -// Sets C++14 compatibility configuration macros based on build environment - -// Disables beast c++14 compatibility additions when set to 1 -// Note, some compatibilty features are enabled or disabled individually. -// -#ifndef BEAST_NO_CXX14_COMPATIBILITY -# ifdef _MSC_VER -# define BEAST_NO_CXX14_COMPATIBILITY 1 -# elif defined(__clang__) && defined(_LIBCPP_VERSION) && __cplusplus >= 201402 -# define BEAST_NO_CXX14_COMPATIBILITY 1 -# else -# define BEAST_NO_CXX14_COMPATIBILITY 0 -# endif -#endif - -// Disables beast's std::make_unique -#ifndef BEAST_NO_CXX14_MAKE_UNIQUE -# ifdef _MSC_VER -# define BEAST_NO_CXX14_MAKE_UNIQUE 1 -# elif defined(__clang__) && defined(_LIBCPP_VERSION) && __cplusplus >= 201402 -# define BEAST_NO_CXX14_MAKE_UNIQUE 1 -# else -# define BEAST_NO_CXX14_MAKE_UNIQUE 0 -# endif -#endif - -// Disables beast's std::equal safe iterator overloads -#ifndef BEAST_NO_CXX14_EQUAL -# if defined(_MSC_VER) && _MSC_VER >= 1900 -# define BEAST_NO_CXX14_EQUAL 1 -# elif defined(_MSC_VER) -# define BEAST_NO_CXX14_EQUAL 0 -# elif defined(__clang__) && defined(_LIBCPP_VERSION) && __cplusplus >= 201402 -# define BEAST_NO_CXX14_EQUAL 1 -# else -# define BEAST_NO_CXX14_EQUAL 0 -# endif -#endif - -// Disables beast's std::integer_sequence -#ifndef BEAST_NO_CXX14_INTEGER_SEQUENCE -# if defined(_MSC_VER) && _MSC_VER >= 1900 -# define BEAST_NO_CXX14_INTEGER_SEQUENCE 1 -# elif defined(_MSC_VER) -# define BEAST_NO_CXX14_INTEGER_SEQUENCE 0 -# elif defined(__clang__) && defined(_LIBCPP_VERSION) && __cplusplus >= 201402 -# define BEAST_NO_CXX14_INTEGER_SEQUENCE 1 -# else -# define BEAST_NO_CXX14_INTEGER_SEQUENCE 0 -# endif -#endif - -// Disables beast's std::make_reverse_iterator -#ifndef BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR -# if defined(_MSC_VER) && _MSC_VER >= 1900 -# define BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR 1 -# elif defined(_MSC_VER) -# define BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR 0 -# elif defined(__clang__) && defined(_LIBCPP_VERSION) && __cplusplus >= 201402 -# define BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR 1 -# else -# define BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR 0 -# endif -#endif - -#endif diff --git a/src/beast/beast/cxx14/cxx14.unity.cpp b/src/beast/beast/cxx14/cxx14.unity.cpp deleted file mode 100644 index 1fbfe8eb9..000000000 --- a/src/beast/beast/cxx14/cxx14.unity.cpp +++ /dev/null @@ -1,20 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#include diff --git a/src/beast/beast/cxx14/functional.h b/src/beast/beast/cxx14/functional.h deleted file mode 100644 index faf6cb9f3..000000000 --- a/src/beast/beast/cxx14/functional.h +++ /dev/null @@ -1,53 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_CXX14_FUNCTIONAL_H_INCLUDED -#define BEAST_CXX14_FUNCTIONAL_H_INCLUDED - -#include - -#include -#include -#include - -#if ! BEAST_NO_CXX14_COMPATIBILITY - -namespace std { - -// C++14 implementation of std::equal_to specialization. -// This supports heterogeneous comparisons. -template <> -struct equal_to -{ - // VFALCO NOTE Its not clear how to support is_transparent pre c++14 - using is_transparent = std::true_type; - - template - auto operator() (T&& lhs, U&& rhs) const -> - decltype (std::forward (lhs) == std::forward (rhs)) - { - return std::forward (lhs) == std::forward (rhs); - } -}; - -} - -#endif - -#endif diff --git a/src/beast/beast/cxx14/iterator.h b/src/beast/beast/cxx14/iterator.h deleted file mode 100644 index dc6741755..000000000 --- a/src/beast/beast/cxx14/iterator.h +++ /dev/null @@ -1,45 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_CXX14_ITERATOR_H_INCLUDED -#define BEAST_CXX14_ITERATOR_H_INCLUDED - -#include - -#include - -#if ! BEAST_NO_CXX14_MAKE_REVERSE_ITERATOR - -namespace std { - -// C++14 implementation of std::make_reverse_iterator to allow creation of a -// reverse iterator from a given iterator. -template -inline -reverse_iterator -make_reverse_iterator(Iter i) -{ - return reverse_iterator(i); -} - -} - -#endif - -#endif diff --git a/src/beast/beast/cxx14/memory.h b/src/beast/beast/cxx14/memory.h deleted file mode 100644 index d229000bd..000000000 --- a/src/beast/beast/cxx14/memory.h +++ /dev/null @@ -1,39 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_CXX14_MEMORY_H_INCLUDED -#define BEAST_CXX14_MEMORY_H_INCLUDED - -#include - -#include - -namespace std { - -#if ! BEAST_NO_CXX14_MAKE_UNIQUE -template -std::unique_ptr make_unique (Args&&... args) -{ - return std::unique_ptr (new T (std::forward (args)...)); -} -#endif - -} - -#endif diff --git a/src/beast/beast/cxx14/tests/integer_sequence.test.cpp b/src/beast/beast/cxx14/tests/integer_sequence.test.cpp deleted file mode 100644 index 0763666f9..000000000 --- a/src/beast/beast/cxx14/tests/integer_sequence.test.cpp +++ /dev/null @@ -1,113 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#if BEAST_INCLUDE_BEASTCONFIG -#include -#endif - -#if ! BEAST_NO_CXX14_INTEGER_SEQUENCE - -#include - -#include - -namespace beast { -namespace asio { - -class integer_sequence_test : public unit_test::suite -{ -public: - template - static - auto - extract (AtContainer const& t, - std::integer_sequence ) -> - decltype (std::make_tuple (std::get (t)...)) - { - return std::make_tuple (std::get (t)...); - } - - void run() - { - // Code from - // http://llvm.org/svn/llvm-project/libcxx/trunk/test/utilities/intseq/intseq.general/integer_seq.pass.cpp - - // Make a couple of sequences - using int3 = std::make_integer_sequence; // generates int: 0,1,2 - using size7 = std::make_integer_sequence; // generates size_t: 0,1,2,3,4,5,6 - using size4 = std::make_index_sequence<4>; // generates size_t: 0,1,2,3 - using size2 = std::index_sequence_for; // generates size_t: 0,1 - using intmix = std::integer_sequence; // generates int: 9,8,7,2 - using sizemix = std::index_sequence<1, 1, 2, 3, 5>; // generates size_t: 1,1,2,3,5 - - // Make sure they're what we expect - static_assert ( std::is_same ::value, "int3 type wrong" ); - static_assert ( int3::static_size == 3, "int3 size wrong" ); - - static_assert ( std::is_same ::value, "size7 type wrong" ); - static_assert ( size7::static_size == 7, "size7 size wrong" ); - - static_assert ( std::is_same ::value, "size4 type wrong" ); - static_assert ( size4::static_size == 4, "size4 size wrong" ); - - static_assert ( std::is_same ::value, "size2 type wrong" ); - static_assert ( size2::static_size == 2, "size2 size wrong" ); - - static_assert ( std::is_same ::value, "intmix type wrong" ); - static_assert ( intmix::static_size == 4, "intmix size wrong" ); - - static_assert ( std::is_same ::value, "sizemix type wrong" ); - static_assert ( sizemix::static_size == 5, "sizemix size wrong" ); - - auto tup = std::make_tuple ( 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ); - - // Use them - auto t3 = extract ( tup, int3() ); - static_assert ( std::tuple_size::value == int3::static_size, "t3 size wrong"); - expect ( t3 == std::make_tuple ( 10, 11, 12 )); - - auto t7 = extract ( tup, size7 ()); - static_assert ( std::tuple_size::value == size7::static_size, "t7 size wrong"); - expect ( t7 == std::make_tuple ( 10, 11, 12, 13, 14, 15, 16 )); - - auto t4 = extract ( tup, size4 ()); - static_assert ( std::tuple_size::value == size4::static_size, "t4 size wrong"); - expect ( t4 == std::make_tuple ( 10, 11, 12, 13 )); - - auto t2 = extract ( tup, size2 ()); - static_assert ( std::tuple_size::value == size2::static_size, "t2 size wrong"); - expect ( t2 == std::make_tuple ( 10, 11 )); - - auto tintmix = extract ( tup, intmix ()); - static_assert ( std::tuple_size::value == intmix::static_size, "tintmix size wrong"); - expect ( tintmix == std::make_tuple ( 19, 18, 17, 12 )); - - auto tsizemix = extract ( tup, sizemix ()); - static_assert ( std::tuple_size::value == sizemix::static_size, "tsizemix size wrong"); - expect ( tsizemix == std::make_tuple ( 11, 11, 12, 13, 15 )); - pass(); - } -}; - -BEAST_DEFINE_TESTSUITE(integer_sequence,cxx14,beast); - -} -} - -#endif diff --git a/src/beast/beast/cxx14/type_traits.h b/src/beast/beast/cxx14/type_traits.h index bfd37b50c..be11f51f9 100644 --- a/src/beast/beast/cxx14/type_traits.h +++ b/src/beast/beast/cxx14/type_traits.h @@ -20,8 +20,6 @@ #ifndef BEAST_CXX14_TYPE_TRAITS_H_INCLUDED #define BEAST_CXX14_TYPE_TRAITS_H_INCLUDED -#include - #include #include #include @@ -43,105 +41,6 @@ struct is_constructible > { }; -namespace detail { - -template -struct compile_time_all; - -template <> -struct compile_time_all <> -{ - static const bool value = true; -}; - -template -struct compile_time_all -{ - static const bool value = - Arg0 && compile_time_all ::value; -}; - -} - -template -struct is_constructible > - : integral_constant ::value...>::value> -{ -}; - -//------------------------------------------------------------------------------ - -#if ! BEAST_NO_CXX14_COMPATIBILITY - -// From http://llvm.org/svn/llvm-project/libcxx/trunk/include/type_traits - -// const-volatile modifications: -template -using remove_const_t = typename remove_const::type; // C++14 -template -using remove_volatile_t = typename remove_volatile::type; // C++14 -template -using remove_cv_t = typename remove_cv::type; // C++14 -template -using add_const_t = typename add_const::type; // C++14 -template -using add_volatile_t = typename add_volatile::type; // C++14 -template -using add_cv_t = typename add_cv::type; // C++14 - -// reference modifications: -template -using remove_reference_t = typename remove_reference::type; // C++14 -template -using add_lvalue_reference_t = typename add_lvalue_reference::type; // C++14 -template -using add_rvalue_reference_t = typename add_rvalue_reference::type; // C++14 - -// sign modifications: -template -using make_signed_t = typename make_signed::type; // C++14 -template -using make_unsigned_t = typename make_unsigned::type; // C++14 - -// array modifications: -template -using remove_extent_t = typename remove_extent::type; // C++14 -template -using remove_all_extents_t = typename remove_all_extents::type; // C++14 - -// pointer modifications: -template -using remove_pointer_t = typename remove_pointer::type; // C++14 -template -using add_pointer_t = typename add_pointer::type; // C++14 - -// other transformations: - -#if 0 -// This is not easy to implement in C++11 -template ::value> -using aligned_storage_t = typename aligned_storage::type; // C++14 -template -using aligned_union_t = typename aligned_union::type; // C++14 -#endif - -template -using decay_t = typename decay::type; // C++14 -template -using enable_if_t = typename enable_if::type; // C++14 -template -using conditional_t = typename conditional::type; // C++14 -template -using common_type_t = typename common_type::type; // C++14 -template -using underlying_type_t = typename underlying_type::type; // C++14 -template -using result_of_t = typename result_of::type; // C++14 - -#endif - } #endif diff --git a/src/beast/beast/cxx14/utility.h b/src/beast/beast/cxx14/utility.h deleted file mode 100644 index e20d81f55..000000000 --- a/src/beast/beast/cxx14/utility.h +++ /dev/null @@ -1,173 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of Beast: https://github.com/vinniefalco/Beast - Copyright 2013, Vinnie Falco - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef BEAST_CXX14_UTILITY_H_INCLUDED -#define BEAST_CXX14_UTILITY_H_INCLUDED - -#include - -#include -#include -#include - -#if ! BEAST_NO_CXX14_INTEGER_SEQUENCE - -namespace std { - -template -struct integer_sequence -{ - using value_type = T; - static_assert (is_integral::value, - "std::integer_sequence can only be instantiated with an integral type" ); - - static const size_t static_size = sizeof...(Ints); - - static /* constexpr */ size_t size() /* noexcept */ - { - return sizeof...(Ints); - } -}; - -template -using index_sequence = integer_sequence ; - -namespace detail { - -// This workaround is needed for msvc broken sizeof... -template -struct sizeof_workaround -{ - static size_t const size = sizeof... (Args); -}; - -} // detail - -#ifdef _MSC_VER - -// This implementation compiles on MSVC and clang but not gcc - -namespace detail { - -template -struct make_integer_sequence_unchecked; - -template -struct make_integer_sequence_unchecked < - T, N, integer_sequence > -{ - using type = typename make_integer_sequence_unchecked< - T, N-1, integer_sequence>::type; -}; - -template -struct make_integer_sequence_unchecked < - T, 0, integer_sequence> -{ - using type = integer_sequence ; -}; - -template -struct make_integer_sequence_checked -{ - static_assert (is_integral ::value, - "T must be an integral type"); - - static_assert (N >= 0, - "N must be non-negative"); - - using type = typename make_integer_sequence_unchecked < - T, N, integer_sequence>::type; -}; - -} // detail - -template -using make_integer_sequence = - typename detail::make_integer_sequence_checked ::type; - -template -using make_index_sequence = make_integer_sequence ; - -template -using index_sequence_for = - make_index_sequence ::size>; - -#else - -// This implementation compiles on gcc but not MSVC - -namespace detail { - -template -struct index_tuple -{ - using next = index_tuple ; - -}; - -template -struct build_index_tuple -{ - using type = typename build_index_tuple ::type::next; -}; - -template <> -struct build_index_tuple <0> -{ - using type = index_tuple<>; -}; - -template ::type -> -struct make_integer_sequence; - -template -struct make_integer_sequence > -{ - static_assert (is_integral ::value, - "T must be an integral type"); - - static_assert (N >= 0, - "N must be non-negative"); - - using type = integer_sequence (Ints)...>; -}; - -} // detail - -template -using make_integer_sequence = - typename detail::make_integer_sequence ::type; - -template -using make_index_sequence = make_integer_sequence ; - -template -using index_sequence_for = - make_index_sequence ::size>; - -#endif - -} - -#endif - -#endif diff --git a/src/beast/beast/hash/fnv1a.h b/src/beast/beast/hash/fnv1a.h index 0e465d65f..6b3f0ef87 100644 --- a/src/beast/beast/hash/fnv1a.h +++ b/src/beast/beast/hash/fnv1a.h @@ -23,7 +23,7 @@ #include #include -#include // +#include namespace beast { diff --git a/src/beast/beast/hash/hash_append.h b/src/beast/beast/hash/hash_append.h index bcb953d69..6cab78cc7 100644 --- a/src/beast/beast/hash/hash_append.h +++ b/src/beast/beast/hash/hash_append.h @@ -36,8 +36,8 @@ #include #include #include -#include // -#include // +#include +#include #include namespace beast { diff --git a/src/beast/beast/hash/xxhasher.h b/src/beast/beast/hash/xxhasher.h index 5525a8450..057255f49 100644 --- a/src/beast/beast/hash/xxhasher.h +++ b/src/beast/beast/hash/xxhasher.h @@ -28,7 +28,7 @@ #include #include -#include // +#include #include namespace beast { diff --git a/src/beast/beast/http/body.h b/src/beast/beast/http/body.h index 82679256e..761b14049 100644 --- a/src/beast/beast/http/body.h +++ b/src/beast/beast/http/body.h @@ -25,7 +25,7 @@ #include #include #include -#include // +#include #include namespace beast { diff --git a/src/beast/beast/http/chunk_encode.h b/src/beast/beast/http/chunk_encode.h index 2168bce7c..1af38b067 100644 --- a/src/beast/beast/http/chunk_encode.h +++ b/src/beast/beast/http/chunk_encode.h @@ -26,7 +26,7 @@ #include #include #include -#include // +#include namespace beast { namespace http { diff --git a/src/beast/beast/insight/impl/Groups.cpp b/src/beast/beast/insight/impl/Groups.cpp index f909ef1da..c70c5b200 100644 --- a/src/beast/beast/insight/impl/Groups.cpp +++ b/src/beast/beast/insight/impl/Groups.cpp @@ -19,7 +19,7 @@ #include #include -#include // +#include namespace beast { namespace insight { diff --git a/src/beast/beast/is_call_possible.h b/src/beast/beast/is_call_possible.h index a5130ed21..e858c2a10 100644 --- a/src/beast/beast/is_call_possible.h +++ b/src/beast/beast/is_call_possible.h @@ -20,7 +20,7 @@ #ifndef BEAST_IS_CALL_POSSIBLE_H_INCLUDED #define BEAST_IS_CALL_POSSIBLE_H_INCLUDED -#include // +#include namespace beast { diff --git a/src/beast/beast/module/core/files/DirectoryIterator.cpp b/src/beast/beast/module/core/files/DirectoryIterator.cpp index 4c5edbc89..cd2a8ef4a 100644 --- a/src/beast/beast/module/core/files/DirectoryIterator.cpp +++ b/src/beast/beast/module/core/files/DirectoryIterator.cpp @@ -21,7 +21,7 @@ */ //============================================================================== -#include // +#include namespace beast { diff --git a/src/beast/beast/module/core/text/LexicalCast.h b/src/beast/beast/module/core/text/LexicalCast.h index ba2907b56..3aed3e01e 100644 --- a/src/beast/beast/module/core/text/LexicalCast.h +++ b/src/beast/beast/module/core/text/LexicalCast.h @@ -28,7 +28,7 @@ #include #include #include -#include // +#include #include #include diff --git a/src/beast/beast/nudb/detail/field.h b/src/beast/beast/nudb/detail/field.h index 5c74747b0..b82ab78b3 100644 --- a/src/beast/beast/nudb/detail/field.h +++ b/src/beast/beast/nudb/detail/field.h @@ -25,7 +25,7 @@ #include #include #include -#include // +#include namespace beast { namespace nudb { diff --git a/src/beast/beast/nudb/detail/format.h b/src/beast/beast/nudb/detail/format.h index e68d359a5..318fc6fa1 100644 --- a/src/beast/beast/nudb/detail/format.h +++ b/src/beast/beast/nudb/detail/format.h @@ -31,7 +31,7 @@ #include #include #include -#include // +#include namespace beast { namespace nudb { diff --git a/src/beast/beast/nudb/detail/varint.h b/src/beast/beast/nudb/detail/varint.h index ff138ea51..c194b909c 100644 --- a/src/beast/beast/nudb/detail/varint.h +++ b/src/beast/beast/nudb/detail/varint.h @@ -23,7 +23,7 @@ #include // for BEAST_CONSTEXPR #include #include -#include // +#include namespace beast { namespace nudb { diff --git a/src/beast/beast/nudb/store.h b/src/beast/beast/nudb/store.h index 4d903b838..04917220e 100644 --- a/src/beast/beast/nudb/store.h +++ b/src/beast/beast/nudb/store.h @@ -45,7 +45,7 @@ #include #include #include -#include // +#include #include #include #include diff --git a/src/beast/beast/random/rngfill.h b/src/beast/beast/random/rngfill.h index 7a7c1fe9e..d2bd7b5fd 100644 --- a/src/beast/beast/random/rngfill.h +++ b/src/beast/beast/random/rngfill.h @@ -23,7 +23,7 @@ #include #include #include -#include // +#include namespace beast { diff --git a/src/beast/beast/streams/basic_scoped_ostream.h b/src/beast/beast/streams/basic_scoped_ostream.h index bb403d4ee..e645334ac 100644 --- a/src/beast/beast/streams/basic_scoped_ostream.h +++ b/src/beast/beast/streams/basic_scoped_ostream.h @@ -20,7 +20,7 @@ #ifndef BEAST_STREAMS_BASIC_SCOPED_OSTREAM_H_INCLUDED #define BEAST_STREAMS_BASIC_SCOPED_OSTREAM_H_INCLUDED -#include // +#include #include #include diff --git a/src/beast/beast/utility/ci_char_traits.h b/src/beast/beast/utility/ci_char_traits.h index 69f8736fc..39d784ba6 100644 --- a/src/beast/beast/utility/ci_char_traits.h +++ b/src/beast/beast/utility/ci_char_traits.h @@ -20,8 +20,8 @@ #ifndef BEAST_UTILITY_CI_CHAR_TRAITS_H_INCLUDED #define BEAST_UTILITY_CI_CHAR_TRAITS_H_INCLUDED -#include // -#include // +#include +#include #include #include #include diff --git a/src/beast/beast/utility/meta.h b/src/beast/beast/utility/meta.h index 4098fadc6..d0e0f4061 100644 --- a/src/beast/beast/utility/meta.h +++ b/src/beast/beast/utility/meta.h @@ -20,7 +20,7 @@ #ifndef BEAST_UTILITY_META_H_INCLUDED #define BEAST_UTILITY_META_H_INCLUDED -#include // +#include namespace beast {