Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

boost/type_traits/detail/mp_defer.hpp

Boost , ,

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

boost/type_traits/detail/mp_defer.hpp

#ifndef BOOST_TYPE_TRAITS_DETAIL_MP_DEFER_HPP_INCLUDED
#define BOOST_TYPE_TRAITS_DETAIL_MP_DEFER_HPP_INCLUDED
//
//  Copyright 2015 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/type_traits/integral_constant.hpp>
#include <boost/type_traits/conditional.hpp>
namespace boost
{
namespace type_traits_detail
{
// mp_valid
// implementation by Bruno Dutra (by the name is_evaluable)
template<template<class...> class F, class... T>
struct mp_valid_impl
{
    template<template<class...> class G, class = G<T...>>
    static boost::true_type check_s(int);
    template<template<class...> class>
    static boost::false_type check_s(...);
    using type = decltype(check_s<F>(0));
};
template<template<class...> class F, class... T>
using mp_valid = typename mp_valid_impl<F, T...>::type;
// mp_defer
struct mp_empty
{
};
template<template<class...> class F, class... T> struct mp_defer_impl
{
    using type = F<T...>;
};
template<template<class...> class F, class... T> using mp_defer = typename boost::conditional<mp_valid<F, T...>::value, mp_defer_impl<F, T...>, mp_empty>::type;
} // namespace type_traits_detail
} // namespace boost
#endif // #ifndef BOOST_TYPE_TRAITS_DETAIL_MP_DEFER_HPP_INCLUDED

Статья boost/type_traits/detail/mp_defer.hpp раздела может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-05-20 13:59:40/0.0049479007720947/1