fork download
  1. #include <type_traits>
  2. #include <cstdint>
  3. #include <string>
  4.  
  5. template <class T, class E = void>
  6. struct Archiver {
  7. void archive(T obj);
  8. };
  9.  
  10. template <class T>
  11. struct Archiver<T, typename std::enable_if<std::is_class<T>::value && !std::is_pod<T>::value>::type>
  12. {
  13. void archive(const T & obj);
  14. };
  15.  
  16. template <> void Archiver<std::uint8_t>::archive(std::uint8_t obj);
  17. template <> void Archiver<std::string>::archive(const std::string & obj);
  18.  
  19. int main() {}
Success #stdin #stdout 0s 3408KB
stdin
Standard input is empty
stdout
Standard output is empty