This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/35571] New: `static function member` cannot appeat in a constant-expression.


template < void ( *F )() >
struct X { };
template < typename T >
struct Y
{
        static void f() { }
        typedef X< f > F;
};
Y< void > test;

$ g++ 0.cpp -c
0.cpp: In instantiation of &#8216;Y<void>&#8217;:
0.cpp:9:   instantiated from here
0.cpp:7: error: &#8216;static void Y<T>::f() [with T = void]&#8217; cannot
appear
                in a constant-expression


-- 
           Summary: `static function member` cannot appeat in a constant-
                    expression.
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pluto at agmk dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35571


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]