Implicit typename

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marcin Kalicinski

    #1

    Implicit typename

    Hi,

    The following code

    template<class Type> class Base::List: public std::list<Type>
    {
    public:
    explicit List(size_type count): std::list<Type> (count) { } // this is
    line 14
    /*...*/
    }

    When compiled with gcc 3.2 gives me the following warning:

    Portable/Base/List.h:14: warning: `std::list<Type , std::allocator< _CharT>[color=blue]
    >::size_type' is implicitly a typename[/color]
    Portable/Base/List.h:14: warning: implicit typename is deprecated, please
    see
    the documentation for details

    What do I need to change to get rid of it?

    thanks,
    Marcin



  • Mike Wahler

    #2
    Re: Implicit typename


    "Marcin Kalicinski" <kalita@poczta. onet.pl> wrote in message
    news:cjjuu4$sud $1@korweta.task .gda.pl...[color=blue]
    > Hi,
    >
    > The following code
    >
    > template<class Type> class Base::List: public std::list<Type>
    > {
    > public:
    > explicit List(size_type count): std::list<Type> (count) { } // this[/color]
    is

    explicit List(std::list< Type>::size_typ e count): std::list<Type> (count)
    { }
    [color=blue]
    > /*...*/
    > }
    >
    > When compiled with gcc 3.2 gives me the following warning:
    >
    > Portable/Base/List.h:14: warning: `std::list<Type , std::allocator< _CharT>[color=green]
    > >::size_type' is implicitly a typename[/color]
    > Portable/Base/List.h:14: warning: implicit typename is deprecated, please[/color]

    Did you:
    [color=blue]
    > see
    > the documentation for details
    >
    > What do I need to change to get rid of it?[/color]

    See above.

    -Mike


    Comment

    Working...