mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-01-23 20:46:37 +00:00
fix README
This commit is contained in:
parent
f5b8b91255
commit
f712788cce
26 changed files with 192 additions and 72 deletions
2
README
2
README
|
@ -175,7 +175,7 @@ See: https://github.com/sscrisk/CEL---ConstExpr-Library
|
|||
## サポートするコンパイラ *(Supported Compilers)*
|
||||
|
||||
Linux:
|
||||
* GCC, C++11 mode: 4.7.2
|
||||
* GCC, C++11 mode: 4.7.2, 4.8.0
|
||||
* Clang, C++11 mode: 3.2
|
||||
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ See: https://github.com/sscrisk/CEL---ConstExpr-Library
|
|||
## サポートするコンパイラ *(Supported Compilers)*
|
||||
|
||||
Linux:
|
||||
* GCC, C++11 mode: 4.7.2
|
||||
* GCC, C++11 mode: 4.7.2, 4.8.0
|
||||
* Clang, C++11 mode: 3.2
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,11 @@
|
|||
#include <sprout/type_traits/identity.hpp>
|
||||
#include <sprout/type_traits/lvalue_reference.hpp>
|
||||
#include <sprout/type_traits/const_reference.hpp>
|
||||
#include <sprout/type_traits/remove_cvref.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_const.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_volatile.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cv.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/type_traits/common_decay.hpp>
|
||||
#include <sprout/type_traits/arithmetic_promote.hpp>
|
||||
#include <sprout/type_traits/float_promote.hpp>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <utility>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/type_traits/identity.hpp>
|
||||
#include <sprout/utility/as_lvalue.hpp>
|
||||
|
||||
namespace sprout {
|
||||
|
@ -10,10 +11,9 @@ namespace sprout {
|
|||
// lvalue_reference
|
||||
//
|
||||
template<typename T>
|
||||
struct lvalue_reference {
|
||||
public:
|
||||
typedef decltype(sprout::as_lvalue(std::declval<T&&>())) type;
|
||||
};
|
||||
struct lvalue_reference
|
||||
: public sprout::identity<decltype(sprout::as_lvalue(std::declval<T&&>()))>
|
||||
{};
|
||||
|
||||
#if SPROUT_USE_TEMPLATE_ALIASES
|
||||
template<typename T>
|
||||
|
|
24
sprout/type_traits/remove_cvref.hpp
Normal file
24
sprout/type_traits/remove_cvref.hpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#ifndef SPROUT_TYPE_TRAITS_REMOVE_CVREF_HPP
|
||||
#define SPROUT_TYPE_TRAITS_REMOVE_CVREF_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// remove_cvref
|
||||
//
|
||||
template<typename T>
|
||||
struct remove_cvref
|
||||
: public std::remove_cv<
|
||||
typename std::remove_reference<T>::type
|
||||
>
|
||||
{};
|
||||
|
||||
#if SPROUT_USE_TEMPLATE_ALIASES
|
||||
template<typename T>
|
||||
using remove_cvref_ = typename sprout::remove_cvref<T>::type;
|
||||
#endif // #if SPROUT_USE_TEMPLATE_ALIASES
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_CVREF_HPP
|
27
sprout/type_traits/remove_shallow_const.hpp
Normal file
27
sprout/type_traits/remove_shallow_const.hpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
#ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CONST_HPP
|
||||
#define SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CONST_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/type_traits/identity.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// remove_shallow_const
|
||||
//
|
||||
template<typename T>
|
||||
struct remove_shallow_const
|
||||
: public sprout::identity<T>
|
||||
{};
|
||||
template<typename T>
|
||||
struct remove_shallow_const<T const>
|
||||
: public std::conditional<std::is_array<T>::value, T const, T>
|
||||
{};
|
||||
|
||||
#if SPROUT_USE_TEMPLATE_ALIASES
|
||||
template<typename T>
|
||||
using remove_shallow_const_ = typename sprout::remove_shallow_const<T>::type;
|
||||
#endif // #if SPROUT_USE_TEMPLATE_ALIASES
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CONST_HPP
|
35
sprout/type_traits/remove_shallow_cv.hpp
Normal file
35
sprout/type_traits/remove_shallow_cv.hpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CV_HPP
|
||||
#define SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CV_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/type_traits/identity.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// remove_shallow_cv
|
||||
//
|
||||
template<typename T>
|
||||
struct remove_shallow_cv
|
||||
: public sprout::identity<T>
|
||||
{};
|
||||
template<typename T>
|
||||
struct remove_shallow_cv<T const>
|
||||
: public std::conditional<std::is_array<T>::value, T const, T>
|
||||
{};
|
||||
template<typename T>
|
||||
struct remove_shallow_cv<T volatile>
|
||||
: public std::conditional<std::is_array<T>::value, T volatile, T>
|
||||
{};
|
||||
template<typename T>
|
||||
struct remove_shallow_cv<T const volatile>
|
||||
: public std::conditional<std::is_array<T>::value, T const volatile, T>
|
||||
{};
|
||||
|
||||
#if SPROUT_USE_TEMPLATE_ALIASES
|
||||
template<typename T>
|
||||
using remove_shallow_cv_ = typename sprout::remove_shallow_cv<T>::type;
|
||||
#endif // #if SPROUT_USE_TEMPLATE_ALIASES
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CV_HPP
|
25
sprout/type_traits/remove_shallow_cvref.hpp
Normal file
25
sprout/type_traits/remove_shallow_cvref.hpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CVREF_HPP
|
||||
#define SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CVREF_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cv.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// remove_shallow_cvref
|
||||
//
|
||||
template<typename T>
|
||||
struct remove_shallow_cvref
|
||||
: public sprout::remove_shallow_cv<
|
||||
typename std::remove_reference<T>::type
|
||||
>
|
||||
{};
|
||||
|
||||
#if SPROUT_USE_TEMPLATE_ALIASES
|
||||
template<typename T>
|
||||
using remove_shallow_cvref_ = typename sprout::remove_shallow_cvref<T>::type;
|
||||
#endif // #if SPROUT_USE_TEMPLATE_ALIASES
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CVREF_HPP
|
27
sprout/type_traits/remove_shallow_volatile.hpp
Normal file
27
sprout/type_traits/remove_shallow_volatile.hpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
#ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_VOLATILE_HPP
|
||||
#define SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_VOLATILE_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/type_traits/identity.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// remove_shallow_volatile
|
||||
//
|
||||
template<typename T>
|
||||
struct remove_shallow_volatile
|
||||
: public sprout::identity<T>
|
||||
{};
|
||||
template<typename T>
|
||||
struct remove_shallow_volatile<T volatile>
|
||||
: public std::conditional<std::is_array<T>::value, T volatile, T>
|
||||
{};
|
||||
|
||||
#if SPROUT_USE_TEMPLATE_ALIASES
|
||||
template<typename T>
|
||||
using remove_shallow_volatile_ = typename sprout::remove_shallow_volatile<T>::type;
|
||||
#endif // #if SPROUT_USE_TEMPLATE_ALIASES
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_VOLATILE_HPP
|
|
@ -1,23 +0,0 @@
|
|||
#ifndef SPROUT_WEED_DETAIL_UNCVREF_HPP
|
||||
#define SPROUT_WEED_DETAIL_UNCVREF_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
namespace detail {
|
||||
template<typename T>
|
||||
struct uncvref
|
||||
: public std::conditional<
|
||||
std::is_array<T>::value
|
||||
|| std::is_array<typename std::remove_reference<T>::type>::value,
|
||||
typename std::remove_reference<T>::type,
|
||||
typename std::decay<T>::type
|
||||
>
|
||||
{};
|
||||
} // namespace detail
|
||||
} // namespace weed
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_WEED_DETAIL_UNCVREF_HPP
|
|
@ -5,9 +5,9 @@
|
|||
#include <sprout/config.hpp>
|
||||
#include <sprout/string.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/traits/type/is_c_str.hpp>
|
||||
#include <sprout/weed/traits/expr/terminal_of.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -17,7 +17,7 @@ namespace sprout {
|
|||
template<typename Arg>
|
||||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
!sprout::weed::traits::is_c_str<
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
>::value,
|
||||
typename sprout::weed::traits::terminal_of<Arg>::type
|
||||
>::type make_terminal(Arg&& arg) {
|
||||
|
@ -28,7 +28,7 @@ namespace sprout {
|
|||
template<typename Arg>
|
||||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::weed::traits::is_c_str<
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
>::value,
|
||||
typename sprout::weed::traits::terminal_of<Arg>::type
|
||||
>::type make_terminal(Arg&& arg) {
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/expr/make_terminal.hpp>
|
||||
#include <sprout/weed/traits/expr/is_expr.hpp>
|
||||
#include <sprout/weed/traits/expr/terminal_or_expr_of.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -17,7 +17,7 @@ namespace sprout {
|
|||
template<typename Arg>
|
||||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
sprout::weed::traits::is_expr<
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
>::value,
|
||||
typename sprout::weed::traits::terminal_or_expr_of<Arg>::type
|
||||
>::type make_terminal_or_expr(Arg&& arg) {
|
||||
|
@ -26,7 +26,7 @@ namespace sprout {
|
|||
template<typename Arg>
|
||||
inline SPROUT_CONSTEXPR typename std::enable_if<
|
||||
!sprout::weed::traits::is_expr<
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
>::value,
|
||||
typename sprout::weed::traits::terminal_or_expr_of<Arg>::type
|
||||
>::type make_terminal_or_expr(Arg&& arg) {
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/expr/tag.hpp>
|
||||
#include <sprout/weed/expr/make_expr.hpp>
|
||||
#include <sprout/weed/traits/expr/expr_of.hpp>
|
||||
#include <sprout/weed/traits/parser/is_parser.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -19,7 +19,7 @@ namespace sprout {
|
|||
typename Arg,
|
||||
typename = typename std::enable_if<
|
||||
sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
>::value
|
||||
>::type
|
||||
>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/expr/tag.hpp>
|
||||
#include <sprout/weed/expr/make_expr.hpp>
|
||||
#include <sprout/weed/traits/expr/expr_of.hpp>
|
||||
#include <sprout/weed/traits/parser/is_parser.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -20,10 +20,10 @@ namespace sprout {
|
|||
typename Arg2,
|
||||
typename = typename std::enable_if<
|
||||
sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg1>::type
|
||||
typename sprout::remove_shallow_cvref<Arg1>::type
|
||||
>::value
|
||||
&& sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg2>::type
|
||||
typename sprout::remove_shallow_cvref<Arg2>::type
|
||||
>::value
|
||||
>::type
|
||||
>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/expr/tag.hpp>
|
||||
#include <sprout/weed/expr/make_expr.hpp>
|
||||
#include <sprout/weed/traits/expr/expr_of.hpp>
|
||||
#include <sprout/weed/traits/parser/is_parser.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -19,7 +19,7 @@ namespace sprout {
|
|||
typename Arg,
|
||||
typename = typename std::enable_if<
|
||||
sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
>::value
|
||||
>::type
|
||||
>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/expr/tag.hpp>
|
||||
#include <sprout/weed/expr/make_expr.hpp>
|
||||
#include <sprout/weed/traits/expr/expr_of.hpp>
|
||||
#include <sprout/weed/traits/parser/is_parser.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -19,7 +19,7 @@ namespace sprout {
|
|||
typename Arg,
|
||||
typename = typename std::enable_if<
|
||||
sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
>::value
|
||||
>::type
|
||||
>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/expr/tag.hpp>
|
||||
#include <sprout/weed/expr/make_expr.hpp>
|
||||
#include <sprout/weed/traits/expr/expr_of.hpp>
|
||||
#include <sprout/weed/traits/parser/is_parser.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -20,7 +20,7 @@ namespace sprout {
|
|||
typename Arg2,
|
||||
typename = typename std::enable_if<
|
||||
sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg1>::type
|
||||
typename sprout::remove_shallow_cvref<Arg1>::type
|
||||
>::value
|
||||
>::type
|
||||
>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/expr/tag.hpp>
|
||||
#include <sprout/weed/expr/make_expr.hpp>
|
||||
#include <sprout/weed/traits/expr/expr_of.hpp>
|
||||
#include <sprout/weed/traits/parser/is_parser.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -20,10 +20,10 @@ namespace sprout {
|
|||
typename Arg2,
|
||||
typename = typename std::enable_if<
|
||||
sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg1>::type
|
||||
typename sprout::remove_shallow_cvref<Arg1>::type
|
||||
>::value
|
||||
&& sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg2>::type
|
||||
typename sprout::remove_shallow_cvref<Arg2>::type
|
||||
>::value
|
||||
>::type
|
||||
>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/expr/tag.hpp>
|
||||
#include <sprout/weed/expr/make_expr.hpp>
|
||||
#include <sprout/weed/traits/expr/expr_of.hpp>
|
||||
#include <sprout/weed/traits/parser/is_parser.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -20,10 +20,10 @@ namespace sprout {
|
|||
typename Arg2,
|
||||
typename = typename std::enable_if<
|
||||
sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg1>::type
|
||||
typename sprout::remove_shallow_cvref<Arg1>::type
|
||||
>::value
|
||||
&& sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg2>::type
|
||||
typename sprout::remove_shallow_cvref<Arg2>::type
|
||||
>::value
|
||||
>::type
|
||||
>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/expr/tag.hpp>
|
||||
#include <sprout/weed/expr/make_expr.hpp>
|
||||
#include <sprout/weed/traits/expr/expr_of.hpp>
|
||||
#include <sprout/weed/traits/parser/is_parser.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -19,7 +19,7 @@ namespace sprout {
|
|||
typename Arg,
|
||||
typename = typename std::enable_if<
|
||||
sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
>::value
|
||||
>::type
|
||||
>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/expr/tag.hpp>
|
||||
#include <sprout/weed/expr/make_expr.hpp>
|
||||
#include <sprout/weed/traits/expr/expr_of.hpp>
|
||||
#include <sprout/weed/traits/parser/is_parser.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -20,10 +20,10 @@ namespace sprout {
|
|||
typename Arg2,
|
||||
typename = typename std::enable_if<
|
||||
sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg1>::type
|
||||
typename sprout::remove_shallow_cvref<Arg1>::type
|
||||
>::value
|
||||
&& sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg2>::type
|
||||
typename sprout::remove_shallow_cvref<Arg2>::type
|
||||
>::value
|
||||
>::type
|
||||
>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/expr/tag.hpp>
|
||||
#include <sprout/weed/expr/make_expr.hpp>
|
||||
#include <sprout/weed/traits/expr/expr_of.hpp>
|
||||
#include <sprout/weed/traits/parser/is_parser.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -19,7 +19,7 @@ namespace sprout {
|
|||
typename Arg,
|
||||
typename = typename std::enable_if<
|
||||
sprout::weed::traits::is_parser<
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
>::value
|
||||
>::type
|
||||
>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -17,9 +17,9 @@ namespace sprout {
|
|||
public:
|
||||
template<typename T>
|
||||
SPROUT_CONSTEXPR typename eval<
|
||||
typename sprout::weed::detail::uncvref<T>::type
|
||||
typename sprout::remove_shallow_cvref<T>::type
|
||||
>::result_type operator()(T&& t) const {
|
||||
typedef eval<typename sprout::weed::detail::uncvref<T>::type> eval_type;
|
||||
typedef eval<typename sprout::remove_shallow_cvref<T>::type> eval_type;
|
||||
return eval_type()(sprout::forward<T>(t));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/expr/expr_fwd.hpp>
|
||||
#include <sprout/weed/traits/expr/terminal_or_expr_of.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -19,7 +19,7 @@ namespace sprout {
|
|||
typedef sprout::weed::expr<
|
||||
Tag,
|
||||
typename sprout::weed::traits::terminal_or_expr_of<
|
||||
typename sprout::weed::detail::uncvref<Args>::type
|
||||
typename sprout::remove_shallow_cvref<Args>::type
|
||||
>::type...
|
||||
> type;
|
||||
};
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/expr/expr_fwd.hpp>
|
||||
#include <sprout/weed/expr/tag.hpp>
|
||||
#include <sprout/weed/traits/type/is_c_str.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
#include <sprout/weed/detail/c_str_as_string.hpp>
|
||||
|
||||
namespace sprout {
|
||||
|
@ -22,14 +22,14 @@ namespace sprout {
|
|||
Arg,
|
||||
typename std::enable_if<
|
||||
!sprout::weed::traits::is_c_str<
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
>::value
|
||||
>::type
|
||||
> {
|
||||
public:
|
||||
typedef sprout::weed::expr<
|
||||
sprout::weed::tag::terminal,
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
> type;
|
||||
};
|
||||
template<typename Arg>
|
||||
|
@ -37,7 +37,7 @@ namespace sprout {
|
|||
Arg,
|
||||
typename std::enable_if<
|
||||
sprout::weed::traits::is_c_str<
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
>::value
|
||||
>::type
|
||||
> {
|
||||
|
@ -45,7 +45,7 @@ namespace sprout {
|
|||
typedef sprout::weed::expr<
|
||||
sprout::weed::tag::terminal,
|
||||
typename sprout::weed::detail::c_str_as_string<
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
>::type
|
||||
> type;
|
||||
};
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/type_traits/remove_shallow_cvref.hpp>
|
||||
#include <sprout/weed/traits/expr/is_expr.hpp>
|
||||
#include <sprout/weed/traits/expr/terminal_of.hpp>
|
||||
#include <sprout/weed/detail/uncvref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace weed {
|
||||
|
@ -18,9 +18,9 @@ namespace sprout {
|
|||
public:
|
||||
typedef typename std::conditional<
|
||||
sprout::weed::traits::is_expr<
|
||||
typename sprout::weed::detail::uncvref<Arg>::type
|
||||
typename sprout::remove_shallow_cvref<Arg>::type
|
||||
>::value,
|
||||
typename sprout::weed::detail::uncvref<Arg>::type,
|
||||
typename sprout::remove_shallow_cvref<Arg>::type,
|
||||
typename sprout::weed::traits::terminal_of<Arg>::type
|
||||
>::type type;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue