プロジェクト

全般

プロフィール

バグ #2088

Typename.hでのエラー `_nil' is not a member of type <struct型名>

n-andoほぼ13年前に追加. ほぼ9年前に更新.

ステータス:
終了
優先度:
通常
担当者:
対象バージョン:
-
開始日:
2011/05/04
期日:
進捗率:

100%

予定工数:

説明

vine40でコンパイルすると、

Controller.cpp:35:   instantiated from here
../../src/lib/rtm/Typename.h:83: error: `_nil' is not a member of type `
   RTC::TimedFloat'

というエラーがでる。

履歴

#1 n-andoほぼ13年前に更新

vine40 での GCCのバージョン

n-ando@vine40:~> g++ -v
/usr/lib/gcc-lib/i386-vine-linux/3.3.6/specs から spec を読み込み中
コンフィグオプション: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-vine-linux
スレッドモデル: posix
gcc バージョン 3.3.6 release (Vine Linux 3.3.6-0vl7)

#2 n-andoほぼ13年前に更新

  • ステータス新規 から 終了 に変更
  • 進捗率0 から 100 に変更

以下の2つの関数を作ることで対処。

  template <class T>
  const char* toRepositoryIdOfStruct()
  {
    return typecode<false, T>::id();
  }

  template <class T>
  const char* toRepositoryIdOfObject()
  {
    return typecode<true, T>::id();
  }

これらを使用しているInPort.h/OutPort.hでは

#if defined(__GNUC__) && (__GNUC__ <= 3 && __GNUC_MINOR__ <= 3) 
      :    InPortBase(name, ::CORBA_Util::toRepositoryIdOfStruct<DataType>()),
#else
      :    InPortBase(name, ::CORBA_Util::toRepositoryId<DataType>()),
#endif

のようにしてifdefで対処。

#3 n-andoほぼ9年前に更新

  • 対象バージョン を削除 (RELEASE_1_1_0)

他の形式にエクスポート: Atom PDF