fork(2) download
  1. #include <tuple>
  2. #include <type_traits>
  3.  
  4. template <typename T, template <typename> class f>
  5. struct transform;
  6.  
  7. template <template <typename...> class C, typename...Ts, template <typename> class f>
  8. struct transform<C<Ts...>, f>
  9. {
  10. using type = C<typename f<Ts>::type...>;
  11. };
  12.  
  13. static_assert(std::is_same<std::tuple<char, int>,
  14. transform<std::tuple<char*, int*>, std::remove_pointer>::type>::value, "unexpected");
  15.  
  16. int main() {
  17. }
  18.  
Success #stdin #stdout 0s 3092KB
stdin
Standard input is empty
stdout
Standard output is empty