fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. class TLine{};
  6. class TCircle{};
  7.  
  8. class TPrimitive
  9. {
  10. public:
  11. TPrimitive(){}
  12. explicit TPrimitive(const TPrimitive&){}
  13. template<class T>
  14. explicit TPrimitive(const T&){}
  15. };
  16.  
  17. int main() {
  18. TPrimitive a=TLine(), b=TCircle();
  19. return 0;
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:18: error: conversion from ‘TLine’ to non-scalar type ‘TPrimitive’ requested
prog.cpp:18: error: conversion from ‘TCircle’ to non-scalar type ‘TPrimitive’ requested
stdout
Standard output is empty