genericopenlibs/cppstdlib/stl/test/compiler/ttei5.cpp
author hgs
Tue, 02 Nov 2010 19:23:22 +0530
changeset 79 564bc7b7ad27
parent 71 28ccaba883f4
permissions -rw-r--r--
201043

/*
 * It is known that this code not compiled by following compilers:
 *   gcc 3.4.1
 *
 * It is known that this code compiled by following compilers:
 *   gcc 2.95.3
 *   gcc 3.3.3
 *
 *   MSVC 6
 *   MSVC 8 Beta
 */

/*
 * Indeed this code is wrong: explicit template specialization
 * have to appear out-of-class.
 *
 */

struct A
{
  private:
    struct B
    {
        template <typename T>
        static void f( T& ) {}

        template <bool V>
        struct C
        {
            template <typename T>
            static void f( T& ) {}
        };

        template <>
        struct C<true>
        {
            template <typename T>
            static void f( T& ) {}
        };
    };
};