Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Template parameter create implemention error
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

myth5
Starting Member

1 Posts

Posted - Jan 06 2014 :  07:58:46 AM  Show Profile  Reply with Quote
class define:
template<typename T, template<typename E, typename = std::allocator<E> > class CONT = std::deque> // deque has default template parameter
class Stack7 {
public:
Stack7();
~Stack7();

void Push(T const& element);
void Pop();
T Top() const;

bool IsEmpty() const {
return elements_.empty();
}

template<typename T1, template<typename E1, typename = std::allocator<E1> > class CONT1>
Stack7<T, CONT>& operator=(Stack7<T1, CONT1> const& object);

private:
CONT<T> elements_;
};

follow code is create by "Refactory(VA)->Create Implemention",
template<typename T1, template<typename E1, typename /*= std::allocator<E1> */> class CONT1>
Stack7<T, CONT>& Stack7::operator=(Stack7<T1* / , CONT1> const& object)
{

}

template<typename T, template<typename E, typename /*= std::allocator<E> */> class CONT /*= std::deque*/>
void Stack7<T, E, CONT>::Push(T const& element)
{

}

actually the right code is like this,

operator= function:
template<typename T, template<typename, typename > class CONT>
template<typename T1, template<typename E1, typename /*= std::allocator<E1> */> class CONT1>
Stack7<T, CONT>& Stack7<T, CONT>::operator=(Stack7<T1 , CONT1> const& object)
{

}

Push funtion:
template<typename T, template<typename E, typename /*= std::allocator<E> */> class CONT /*= std::deque*/>
void Stack7<T, CONT>::Push(T const& element)
{

}
maybe the description is incorrect,but the code say all.

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jan 06 2014 :  12:45:28 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=79393

For now you are going to need to fix the declarations manually, but hopefully VA is doing enough to make this feature useful, and hopefully you are not seeing this problem to often.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000