From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26390 invoked by alias); 27 Jul 2009 05:47:05 -0000 Received: (qmail 26319 invoked by uid 48); 27 Jul 2009 05:46:54 -0000 Date: Mon, 27 Jul 2009 05:47:00 -0000 Message-ID: <20090727054654.26318.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/40497] invalid std::next / std::prev declaration In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jason at gcc dot gnu dot org" 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 X-SW-Source: 2009-07/txt/msg02136.txt.bz2 ------- Comment #20 from jason at gcc dot gnu dot org 2009-07-27 05:46 ------- Actually, no. It seems that T being invalid doesn't result in a SFINAE situation. 14.9.2/8: Only invalid types and expressions in the immediate context of the function type and its template parameter types can result in a deduction failure. [ Note: The evaluation of the substituted types and expressions can result in side effects such as the instantiation of class template specializations and/or function template specializations, the generation of implicitly-defined functions, etc. Such side effects are not in the “immediate context” and can result in the program being ill-formed. — end note ] -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40497