/
usr
/
include
/
boost
/
hof
/
/usr/include/boost/hof
mkdir
upload
Name
Size
Mode
Actions
detail/
-
0755
rm
alias.hpp
5552
0644
edit
dl
rm
always.hpp
4261
0644
edit
dl
rm
apply.hpp
8363
0644
edit
dl
rm
apply_eval.hpp
4428
0644
edit
dl
rm
arg.hpp
3148
0644
edit
dl
rm
capture.hpp
5419
0644
edit
dl
rm
combine.hpp
3877
0644
edit
dl
rm
compose.hpp
5042
0644
edit
dl
rm
config.hpp
6149
0644
edit
dl
rm
construct.hpp
8774
0644
edit
dl
rm
decay.hpp
1790
0644
edit
dl
rm
decorate.hpp
6329
0644
edit
dl
rm
eval.hpp
2400
0644
edit
dl
rm
first_of.hpp
7100
0644
edit
dl
rm
fix.hpp
6314
0644
edit
dl
rm
flip.hpp
2690
0644
edit
dl
rm
flow.hpp
5060
0644
edit
dl
rm
fold.hpp
5000
0644
edit
dl
rm
function.hpp
3129
0644
edit
dl
rm
function_param_limit.hpp
1658
0644
edit
dl
rm
identity.hpp
1884
0644
edit
dl
rm
if.hpp
3314
0644
edit
dl
rm
implicit.hpp
4041
0644
edit
dl
rm
indirect.hpp
3268
0644
edit
dl
rm
infix.hpp
6043
0644
edit
dl
rm
is_invocable.hpp
1706
0644
edit
dl
rm
is_unpackable.hpp
3341
0644
edit
dl
rm
lambda.hpp
6458
0644
edit
dl
rm
lazy.hpp
8729
0644
edit
dl
rm
lift.hpp
3752
0644
edit
dl
rm
limit.hpp
3817
0644
edit
dl
rm
match.hpp
3331
0644
edit
dl
rm
mutable.hpp
1988
0644
edit
dl
rm
pack.hpp
12747
0644
edit
dl
rm
partial.hpp
8307
0644
edit
dl
rm
pipable.hpp
6227
0644
edit
dl
rm
placeholders.hpp
13799
0644
edit
dl
rm
proj.hpp
7517
0644
edit
dl
rm
protect.hpp
2145
0644
edit
dl
rm
repeat.hpp
4184
0644
edit
dl
rm
repeat_while.hpp
5154
0644
edit
dl
rm
result.hpp
3644
0644
edit
dl
rm
returns.hpp
8607
0644
edit
dl
rm
reveal.hpp
12187
0644
edit
dl
rm
reverse_fold.hpp
5271
0644
edit
dl
rm
rotate.hpp
2576
0644
edit
dl
rm
static.hpp
2395
0644
edit
dl
rm
tap.hpp
2118
0644
edit
dl
rm
unpack.hpp
5588
0644
edit
dl
rm
unpack_sequence.hpp
1810
0644
edit
dl
rm
version.hpp
679
0644
edit
dl
rm
Edit:
/usr/include/boost/hof/alias.hpp
(5552B)
/*============================================================================= Copyright (c) 2015 Paul Fultz II alias.h 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_HOF_GUARD_ALIAS_H #define BOOST_HOF_GUARD_ALIAS_H #include <boost/hof/returns.hpp> #include <boost/hof/detail/delegate.hpp> #include <boost/hof/detail/move.hpp> #include <boost/hof/detail/holder.hpp> #include <boost/hof/config.hpp> /// alias /// ===== /// /// Description /// ----------- /// /// The `alias` class wraps a type with a new type that can be tagged by the /// user. This allows defining extra attributes about the type outside of the /// type itself. There are three different ways the value can be stored: as a /// member variable, by inheritance, or as a static member variable. The value /// can be retrieved uniformily using the `alias_value` function. /// /// Synopsis /// -------- /// /// // Alias the type using a member variable /// template<class T, class Tag=void> /// class alias; /// /// // Alias the type by inheriting /// template<class T, class Tag=void> /// class alias_inherit; /// /// // Alias the type using a static variable /// template<class T, class Tag=void> /// class alias_static; /// /// // Retrieve tag from alias /// template<class Alias> /// class alias_tag; /// /// // Check if type has a certian tag /// template<class T, class Tag> /// class has_tag; /// /// // Retrieve value from alias /// template<class Alias> /// constexpr auto alias_value(Alias&&); /// #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4579) #endif namespace boost { namespace hof { template<class T> struct alias_tag; template<class T, class Tag, class=void> struct has_tag : std::false_type {}; template<class T, class Tag> struct has_tag<T, Tag, typename detail::holder< typename alias_tag<T>::type >::type> : std::is_same<typename alias_tag<T>::type, Tag> {}; namespace detail { template<class T> constexpr T& lvalue(T& x) noexcept { return x; } template<class T> constexpr const T& lvalue(const T& x) noexcept { return x; } } #define BOOST_HOF_UNARY_PERFECT_FOREACH(m) \ m(const&, boost::hof::detail::lvalue) \ m(&, boost::hof::detail::lvalue) \ m(&&, boost::hof::move) \ template<class T, class Tag=void> struct alias { T value; BOOST_HOF_DELEGATE_CONSTRUCTOR(alias, T, value) }; #define BOOST_HOF_DETAIL_ALIAS_GET_VALUE(ref, move) \ template<class Tag, class T, class... Ts> \ constexpr auto alias_value(alias<T, Tag> ref a, Ts&&...) BOOST_HOF_RETURNS(move(a.value)) BOOST_HOF_UNARY_PERFECT_FOREACH(BOOST_HOF_DETAIL_ALIAS_GET_VALUE) template<class T, class Tag> struct alias_tag<alias<T, Tag>> { typedef Tag type; }; template<class T, class Tag=void> struct alias_inherit #if (defined(__GNUC__) && !defined (__clang__)) : std::conditional<(std::is_class<T>::value), T, alias<T>>::type #else : T #endif { BOOST_HOF_INHERIT_CONSTRUCTOR(alias_inherit, T) }; #define BOOST_HOF_DETAIL_ALIAS_INHERIT_GET_VALUE(ref, move) \ template<class Tag, class T, class... Ts, class=typename std::enable_if<(BOOST_HOF_IS_CLASS(T))>::type> \ constexpr T ref alias_value(alias_inherit<T, Tag> ref a, Ts&&...) BOOST_HOF_RETURNS_DEDUCE_NOEXCEPT(move(a)) \ { \ return move(a); \ } BOOST_HOF_UNARY_PERFECT_FOREACH(BOOST_HOF_DETAIL_ALIAS_INHERIT_GET_VALUE) template<class T, class Tag> struct alias_tag<alias_inherit<T, Tag>> { typedef Tag type; }; namespace detail { template<class T, class Tag> struct alias_static_storage { #ifdef _MSC_VER // Since we disable the error for 4579 on MSVC, which leaves the static // member unitialized at runtime, it is, therefore, only safe to use this // class on types that are empty with constructors that have no possible // side effects. static_assert(BOOST_HOF_IS_EMPTY(T) && BOOST_HOF_IS_LITERAL(T) && BOOST_HOF_IS_DEFAULT_CONSTRUCTIBLE(T), "In-class initialization is not yet implemented on MSVC"); #endif static constexpr T value = T(); }; template<class T, class Tag> constexpr T alias_static_storage<T, Tag>::value; } template<class T, class Tag=void> struct alias_static { template<class... Ts, BOOST_HOF_ENABLE_IF_CONSTRUCTIBLE(T, Ts...)> constexpr alias_static(Ts&&...) noexcept {} }; template<class Tag, class T, class... Ts> constexpr const T& alias_value(const alias_static<T, Tag>&, Ts&&...) noexcept { return detail::alias_static_storage<T, Tag>::value; } template<class T, class Tag> struct alias_tag<alias_static<T, Tag>> { typedef Tag type; }; namespace detail { template<class T, class Tag> struct alias_try_inherit : std::conditional<(BOOST_HOF_IS_CLASS(T) && !BOOST_HOF_IS_FINAL(T) && !BOOST_HOF_IS_POLYMORPHIC(T)), alias_inherit<T, Tag>, alias<T, Tag> > {}; #if BOOST_HOF_HAS_EBO template<class T, class Tag> struct alias_empty : std::conditional<(BOOST_HOF_IS_EMPTY(T)), typename alias_try_inherit<T, Tag>::type, alias<T, Tag> > {}; #else template<class T, class Tag> struct alias_empty : std::conditional< BOOST_HOF_IS_EMPTY(T) && BOOST_HOF_IS_LITERAL(T) && BOOST_HOF_IS_DEFAULT_CONSTRUCTIBLE(T), alias_static<T, Tag>, alias<T, Tag> > {}; #endif } }} // namespace boost::hof #ifdef _MSC_VER #pragma warning(pop) #endif #endif
Save
cmd:
run