Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:38:14

0001 /*=============================================================================
0002     Copyright (c) 2012 Paul Fultz II
0003     join.h
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 ==============================================================================*/
0007 
0008 #ifndef BOOST_HOF_GUARD_FUNCTION_DETAIL_JOIN_H
0009 #define BOOST_HOF_GUARD_FUNCTION_DETAIL_JOIN_H
0010 
0011 #include <boost/hof/detail/holder.hpp>
0012 
0013 namespace boost { namespace hof { namespace detail {
0014 
0015 template<class... Ts>
0016 struct join_args
0017 {};
0018 
0019 template<template <class...> class T, class Args, class=void>
0020 struct join_impl
0021 {};
0022 
0023 template<template <class...> class T, class... Args>
0024 struct join_impl<T, join_args<Args...>, typename holder<
0025     T<Args...>
0026 >::type>
0027 { typedef T<Args...> type; };
0028 
0029 template<template <class...> class T, class... Args>
0030 struct join
0031 : join_impl<T, join_args<Args...>>
0032 {};
0033 
0034 }}} // namespace boost::hof
0035 
0036 #if defined(__GNUC__) && !defined (__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ < 7
0037 #define BOOST_HOF_JOIN(c, ...) typename boost::hof::detail::join<c, __VA_ARGS__>::type
0038 #else
0039 #define BOOST_HOF_JOIN(c, ...) c<__VA_ARGS__>
0040 
0041 #endif
0042 
0043 #endif