/usr/include/boost/hof
NameSizeModeActions
detail/-0755rm
alias.hpp55520644editdlrm
always.hpp42610644editdlrm
apply.hpp83630644editdlrm
apply_eval.hpp44280644editdlrm
arg.hpp31480644editdlrm
capture.hpp54190644editdlrm
combine.hpp38770644editdlrm
compose.hpp50420644editdlrm
config.hpp61490644editdlrm
construct.hpp87740644editdlrm
decay.hpp17900644editdlrm
decorate.hpp63290644editdlrm
eval.hpp24000644editdlrm
first_of.hpp71000644editdlrm
fix.hpp63140644editdlrm
flip.hpp26900644editdlrm
flow.hpp50600644editdlrm
fold.hpp50000644editdlrm
function.hpp31290644editdlrm
function_param_limit.hpp16580644editdlrm
identity.hpp18840644editdlrm
if.hpp33140644editdlrm
implicit.hpp40410644editdlrm
indirect.hpp32680644editdlrm
infix.hpp60430644editdlrm
is_invocable.hpp17060644editdlrm
is_unpackable.hpp33410644editdlrm
lambda.hpp64580644editdlrm
lazy.hpp87290644editdlrm
lift.hpp37520644editdlrm
limit.hpp38170644editdlrm
match.hpp33310644editdlrm
mutable.hpp19880644editdlrm
pack.hpp127470644editdlrm
partial.hpp83070644editdlrm
pipable.hpp62270644editdlrm
placeholders.hpp137990644editdlrm
proj.hpp75170644editdlrm
protect.hpp21450644editdlrm
repeat.hpp41840644editdlrm
repeat_while.hpp51540644editdlrm
result.hpp36440644editdlrm
returns.hpp86070644editdlrm
reveal.hpp121870644editdlrm
reverse_fold.hpp52710644editdlrm
rotate.hpp25760644editdlrm
static.hpp23950644editdlrm
tap.hpp21180644editdlrm
unpack.hpp55880644editdlrm
unpack_sequence.hpp18100644editdlrm
version.hpp6790644editdlrm
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 #include #include #include #include /// 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 alias; /// /// // Alias the type by inheriting /// template /// class alias_inherit; /// /// // Alias the type using a static variable /// template /// class alias_static; /// /// // Retrieve tag from alias /// template /// class alias_tag; /// /// // Check if type has a certian tag /// template /// class has_tag; /// /// // Retrieve value from alias /// template /// constexpr auto alias_value(Alias&&); /// #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4579) #endif namespace boost { namespace hof { template struct alias_tag; template struct has_tag : std::false_type {}; template struct has_tag::type >::type> : std::is_same::type, Tag> {}; namespace detail { template constexpr T& lvalue(T& x) noexcept { return x; } template 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 struct alias { T value; BOOST_HOF_DELEGATE_CONSTRUCTOR(alias, T, value) }; #define BOOST_HOF_DETAIL_ALIAS_GET_VALUE(ref, move) \ template \ constexpr auto alias_value(alias ref a, Ts&&...) BOOST_HOF_RETURNS(move(a.value)) BOOST_HOF_UNARY_PERFECT_FOREACH(BOOST_HOF_DETAIL_ALIAS_GET_VALUE) template struct alias_tag> { typedef Tag type; }; template struct alias_inherit #if (defined(__GNUC__) && !defined (__clang__)) : std::conditional<(std::is_class::value), T, alias>::type #else : T #endif { BOOST_HOF_INHERIT_CONSTRUCTOR(alias_inherit, T) }; #define BOOST_HOF_DETAIL_ALIAS_INHERIT_GET_VALUE(ref, move) \ template::type> \ constexpr T ref alias_value(alias_inherit 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 struct alias_tag> { typedef Tag type; }; namespace detail { template 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 constexpr T alias_static_storage::value; } template struct alias_static { template constexpr alias_static(Ts&&...) noexcept {} }; template constexpr const T& alias_value(const alias_static&, Ts&&...) noexcept { return detail::alias_static_storage::value; } template struct alias_tag> { typedef Tag type; }; namespace detail { template struct alias_try_inherit : std::conditional<(BOOST_HOF_IS_CLASS(T) && !BOOST_HOF_IS_FINAL(T) && !BOOST_HOF_IS_POLYMORPHIC(T)), alias_inherit, alias > {}; #if BOOST_HOF_HAS_EBO template struct alias_empty : std::conditional<(BOOST_HOF_IS_EMPTY(T)), typename alias_try_inherit::type, alias > {}; #else template struct alias_empty : std::conditional< BOOST_HOF_IS_EMPTY(T) && BOOST_HOF_IS_LITERAL(T) && BOOST_HOF_IS_DEFAULT_CONSTRUCTIBLE(T), alias_static, alias > {}; #endif } }} // namespace boost::hof #ifdef _MSC_VER #pragma warning(pop) #endif #endif