fork(3) download
  1. #include <iostream>
  2.  
  3. template<typename tType>
  4. class A {
  5. public:
  6. A () {}
  7.  
  8. template<typename...tTypes> A (tTypes...pArgs) {
  9. std::cout << __PRETTY_FUNCTION__ << std::endl;
  10. }
  11. };
  12.  
  13. class B {
  14. public:
  15. template<typename tType>
  16. operator A<tType> () const {
  17. std::cout << __PRETTY_FUNCTION__ << std::endl;
  18. return A<tType>();
  19. }
  20. };
  21.  
  22. int main() {
  23. B b;
  24. A<float> a = b;
  25. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
A<tType>::A(tTypes ...) [with tTypes = {B}; tType = float]