Beispiel #1
0
 void
 tendril::enforce_compatible_type(const tendril& rhs) const
 {
   if (!compatible_type(rhs))
   {
     throw except::TypeMismatch(type_name() + " is not compatible with " + rhs.type_name());
   }
 }
Beispiel #2
0
void tendril::copy_value(const tendril& rhs)
{
  if (this == &rhs)
    return;
  if (is_type<none> ())
    {
      holder_ = rhs.holder_->clone();
    }
  else if (compatible_type(rhs))
    {
      *holder_ = *rhs.holder_;
    }
  dirty_ = true;
}