Home » U++ Library support » LineEdit, EditFields, DocEdit » recent MinMax Refresh fix not GCC compilable
|
|
Re: recent MinMax Refresh fix not GCC compilable [message #29456 is a reply to message #29455] |
Thu, 21 October 2010 21:52 |
|
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
you probably placed the typedef outside the class, it has to be like
template <class DataType, class Cv>
class EditMinMax : public EditValue<DataType, Cv> {
public:
typedef EditValue<DataType, Cv> R;
EditMinMax& operator=(const DataType& t) { SetData(t); return *this; }
EditMinMax() {}
EditMinMax(DataType min, DataType max) { Cv::MinMax(min, max); }
EditMinMax& Min(DataType min) { Cv::Min(min); R::Refresh(); return *this; }
EditMinMax& Max(DataType max) { Cv::Max(max); R::Refresh(); return *this; }
EditMinMax& NotNull(bool nn = true) { Cv::NotNull(nn); R::Refresh(); return *this; }
};
template <class DataType, class Cv>
class EditMinMaxNotNull : public EditValue<DataType, Cv> {
public:
typedef EditValue<DataType, Cv> R;
EditMinMaxNotNull& operator=(const DataType& t) { SetData(t); return *this; }
EditMinMaxNotNull() { Cv::NotNull(); }
EditMinMaxNotNull(DataType min, DataType max) { Cv::NotNull(); Cv::MinMax(min, max); }
EditMinMaxNotNull& Min(DataType min) { Cv::Min(min); R::Refresh(); return *this; }
EditMinMaxNotNull& Max(DataType max) { Cv::Max(max); R::Refresh(); return *this; }
EditMinMaxNotNull& NotNull(bool nn = true) { Cv::NotNull(nn); R::Refresh(); return *this; }
};
tried it with both TDMGCC and MINGW, must work
|
|
|
|
|
Goto Forum:
Current Time: Sun Apr 28 23:08:37 CEST 2024
Total time taken to generate the page: 0.06222 seconds
|