From a5c50a4f262f0a880734623f79d4dc2f1aa8a0a2 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 13 Aug 2019 10:29:39 +0200 Subject: Pull in files from odr-mmbtools-common Replace ASIO by simpler implementation, meaning that the telnet RC now only supports a single connection. Move Log, RC to lib/ --- lib/asio/associated_allocator.hpp | 131 -------------------------------------- 1 file changed, 131 deletions(-) delete mode 100644 lib/asio/associated_allocator.hpp (limited to 'lib/asio/associated_allocator.hpp') diff --git a/lib/asio/associated_allocator.hpp b/lib/asio/associated_allocator.hpp deleted file mode 100644 index 8b488bb..0000000 --- a/lib/asio/associated_allocator.hpp +++ /dev/null @@ -1,131 +0,0 @@ -// -// associated_allocator.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) -// -// 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 ASIO_ASSOCIATED_ALLOCATOR_HPP -#define ASIO_ASSOCIATED_ALLOCATOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include "asio/detail/config.hpp" -#include -#include "asio/detail/type_traits.hpp" - -#include "asio/detail/push_options.hpp" - -namespace asio { -namespace detail { - -template -struct associated_allocator_check -{ - typedef void type; -}; - -template -struct associated_allocator_impl -{ - typedef E type; - - static type get(const T&, const E& e) ASIO_NOEXCEPT - { - return e; - } -}; - -template -struct associated_allocator_impl::type> -{ - typedef typename T::allocator_type type; - - static type get(const T& t, const E&) ASIO_NOEXCEPT - { - return t.get_allocator(); - } -}; - -} // namespace detail - -/// Traits type used to obtain the allocator associated with an object. -/** - * A program may specialise this traits type if the @c T template parameter in - * the specialisation is a user-defined type. The template parameter @c - * Allocator shall be a type meeting the Allocator requirements. - * - * Specialisations shall meet the following requirements, where @c t is a const - * reference to an object of type @c T, and @c a is an object of type @c - * Allocator. - * - * @li Provide a nested typedef @c type that identifies a type meeting the - * Allocator requirements. - * - * @li Provide a noexcept static member function named @c get, callable as @c - * get(t) and with return type @c type. - * - * @li Provide a noexcept static member function named @c get, callable as @c - * get(t,a) and with return type @c type. - */ -template > -struct associated_allocator -{ - /// If @c T has a nested type @c allocator_type, T::allocator_type. - /// Otherwise @c Allocator. -#if defined(GENERATING_DOCUMENTATION) - typedef see_below type; -#else // defined(GENERATING_DOCUMENTATION) - typedef typename detail::associated_allocator_impl::type type; -#endif // defined(GENERATING_DOCUMENTATION) - - /// If @c T has a nested type @c allocator_type, returns - /// t.get_allocator(). Otherwise returns @c a. - static type get(const T& t, - const Allocator& a = Allocator()) ASIO_NOEXCEPT - { - return detail::associated_allocator_impl::get(t, a); - } -}; - -/// Helper function to obtain an object's associated allocator. -/** - * @returns associated_allocator::get(t) - */ -template -inline typename associated_allocator::type -get_associated_allocator(const T& t) ASIO_NOEXCEPT -{ - return associated_allocator::get(t); -} - -/// Helper function to obtain an object's associated allocator. -/** - * @returns associated_allocator::get(t, a) - */ -template -inline typename associated_allocator::type -get_associated_allocator(const T& t, const Allocator& a) ASIO_NOEXCEPT -{ - return associated_allocator::get(t, a); -} - -#if defined(ASIO_HAS_ALIAS_TEMPLATES) - -template > -using associated_allocator_t - = typename associated_allocator::type; - -#endif // defined(ASIO_HAS_ALIAS_TEMPLATES) - -} // namespace asio - -#include "asio/detail/pop_options.hpp" - -#endif // ASIO_ASSOCIATED_ALLOCATOR_HPP -- cgit v1.2.3