Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- template <typename ... TParent>
- class Parent {
- public:
- class Child {
- public:
- template <typename ... T>
- void childDummyFunction() {
- }
- };
- template <typename ... TFunctionParameters>
- void parentFunction() {
- Child child;
- child.childDummyFunction<TFunctionParameters...>();
- }
- };
- int main()
- {
- Parent<int> sys;
- sys.parentFunction<float>();
- std::cout << "Hello, " << "!\n";
- }
- /*
- main.cpp: In member function ‘void Parent<TParent>::parentFunction()’:
- main.cpp:19:47: error: expected primary-expression before ‘...’ token
- child.childDummyFunction<TFunctionParameters...>();
- ^~~
- main.cpp:19:47: error: expected ‘;’ before ‘...’ token
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement