>>695
boost::variant とか boost::any とか、自作のクラス。

自作のクラスだと、↓こんなのかな。

class Value
{
  bool AsBoolean() const;
  int AsInteger() const;
  std::string AsString() const;
  double AsReal() const;
  std::complex AsComplex() const;
  // ... マジで int と short とか double と float とか区別する必要あるの?
};

header->GetKeyword("weight")->GetValue()->AsReal() って感じ。