Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Template parameter create implemention error

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
myth5 Posted - Jan 06 2014 : 07:58:46 AM
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.
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 06 2014 : 12:45:28 PM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000