From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2333 invoked by alias); 27 Jun 2002 02:26:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 2304 invoked by uid 71); 27 Jun 2002 02:26:00 -0000 Resent-Date: 27 Jun 2002 02:26:00 -0000 Resent-Message-ID: <20020627022600.2303.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, philippeb@videotron.ca Received: (qmail 25613 invoked by uid 61); 27 Jun 2002 02:23:12 -0000 Message-Id: <20020627022312.25612.qmail@sources.redhat.com> Date: Wed, 26 Jun 2002 23:06:00 -0000 From: philippeb@videotron.ca Reply-To: philippeb@videotron.ca To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7136: Template constants deduction X-SW-Source: 2002-06/txt/msg00640.txt.bz2 List-Id: >Number: 7136 >Category: c++ >Synopsis: Template constants deduction >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Jun 26 19:26:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: g++ >Release: gcc version 2.95.4 20011006 (Debian prerelease) >Organization: >Environment: Linux 2.2.19pre17 i686 >Description: Pointer to member template constants are not properly resolved. The compiler returns: template.cpp:18: type/value mismatch at argument 2 in template parameter list for `template<_T, int _T::* > struct Number' template.cpp:18: expected a constant of type `int _T::*', got `int _T::*' template.cpp:19: ISO C++ forbids declaration of `parameter' with no type template.cpp: In function `int main()': template.cpp:27: no matching function for call to `foo(Number)' >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="template.cpp" Content-Disposition: inline; filename="template.cpp" #include using namespace std; struct Type { int i; }; template struct Number { }; template void foo(Number<_T, int _T::*> const &) { cout << __PRETTY_FUNCTION__ << endl; } int main() { foo(Number()); return 0; }