I would say you are stuck between a rock and a hard place. You keep stating it can't have an initial value but it
HAS to. Otherwise your will class will not operate correctly. This is why :
this_type& operator += (const interval_type& rhs)
{
assert(contiguous(*this, rhs));
if (*this < rhs) high = rhs.high;
else low = rhs.low;
return *this;
}
It
HAS to have a value to compare the rhs with. If this just will not work for you then add a boolean flag to state whether it has ever been assigned. if not then at the first comparison skip it and assign the value. The logic would then become this :
this_type& operator += (const interval_type& rhs)
{
assert(contiguous(*this, rhs));
if( assigned )
{
if( *this < rhs )
high = rhs.high;
else
low = rhs.low;
}
else
{
high = rhs.high;
low = rhs.low;
assigned = true;
}
return *this;
}
I have no idea whether that logic would work but you have few other options for dealing with this.