From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3302 invoked by alias); 26 Oct 2014 10:25:01 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 3266 invoked by uid 48); 26 Oct 2014 10:24:56 -0000 From: "shunichi_wakabayashi at yahoo dot co.jp" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/63648] New: compile error w/ pointer argument of result_of-is_same-enable_if returns Date: Sun, 26 Oct 2014 10:34:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: shunichi_wakabayashi at yahoo dot co.jp X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg02018.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63648 Bug ID: 63648 Summary: compile error w/ pointer argument of result_of-is_same-enable_if returns Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: shunichi_wakabayashi at yahoo dot co.jp Created attachment 33811 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33811&action=edit compile error with gcc 4.8.2 As my attached file, declaration of template functions with pointer arguments indicate to result-type of specific type_traits functions like, enable_if::type>, any_type>::value, int>::type* can trigger compile error with following messages, > prog.cc:20:5: error: no matching function for call to 'invoke_func' > invoke_func(0, retint); > ^~~~~~~~~~~ > prog.cc:12:30: note: candidate template ignored: substitution failure [with FUNC = int (*)(int)] > template void invoke_func( the error could be resolved if changing TEMPLATE_ARG to NON_TEMPLATE_ARG or pointer to normal value or moving enable_if<...> trick to outside of function arguments declaration (e.g. auto funcname(...) -> enable_if<...>::type) for example, when changing line #13 to like follows, the error disappears: typename enable_if::type>::value>::type*, // not template arg or typename enable_if::type>::value>::type, // not pointer this problem cannot be occurred with gcc 4.9.x is it a known bug? thanks