// -*-mode:c++;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8-*- // vi: set et ft=cpp ts=4 sts=4 sw=4 fenc=utf-8 :vi #ifndef CTL_DECAY_H_ #define CTL_DECAY_H_ #include "add_pointer.h" #include "conditional.h" #include "is_array.h" #include "is_function.h" #include "remove_cv.h" #include "remove_extent.h" #include "remove_reference.h" namespace ctl { template struct decay { private: typedef typename ctl::remove_reference::type U; public: typedef typename ctl::conditional< ctl::is_array::value, typename ctl::remove_extent::type*, typename ctl::conditional::value, typename ctl::add_pointer::type, typename ctl::remove_cv::type>::type>::type type; }; template using decay_t = typename decay::type; } // namespace ctl #endif // CTL_DECAY_H_