Sprout/sprout/weed/detail/uncvref.hpp

24 lines
596 B
C++
Raw Normal View History

2011-11-13 08:54:38 +00:00
#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