Ignore:
Timestamp:
Jun 5, 2008, 10:04:39 PM (16 years ago)
Author:
dai_9181
Message:

ジェネリッククラスの型パラメータに値型が指定されたときに限り、テンプレート展開を行うようにした。

TODO: libファイルを跨ってテンプレート展開ができていないため、ソースコード管理部分に手を加える必要あり。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp

    r603 r632  
    384384    return false;
    385385}
     386
     387bool Type::IsValueType() const
     388{
     389    return ( IsWhole() || IsReal() );
     390}
     391
    386392bool Type::IsProcPtr() const
    387393{
     
    550556}
    551557
     558bool Types::IsEquals( const Types &types ) const
     559{
     560    if( this->size() != types.size() )
     561    {
     562        // アイテム数が違う
     563        return false;
     564    }
     565
     566    const Types &thisTypes = *this;
     567    for( int i=0; i<static_cast<int>(this->size()); i++ )
     568    {
     569        if( !thisTypes[i].Equals( types[i] ) )
     570        {
     571            return false;
     572        }
     573    }
     574
     575    return true;
     576}
    552577
    553578void ResolveFormalGenericTypeParameter( Type &typeParameter, const Type &classType, const UserProc *pUserProc )
Note: See TracChangeset for help on using the changeset viewer.