X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=1.7 required=5.0	tests=AWL,BAYES_00,KHOP_THREADED
X-Spam-Check-By: sourceware.org
Message-ID: <50125346.5000209@123gen.com>
Date: Fri, 27 Jul 2012 10:37:26 +0200
From: Zouzou <internet@123gen.com>
Reply-To: internet@123gen.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: <regex> doesn't work with g++
References: <5011BAAA.7070308@dancol.org> <50120512.1090703@users.sourceforge.net> <50120A6A.6050305@dancol.org>
In-Reply-To: <50120A6A.6050305@dancol.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 27/07/12 5:26, Daniel Colascione wrote:
> On 7/26/2012 8:03 PM, Yaakov (Cygwin/X) wrote:
>> On 2012-07-26 16:46, Daniel Colascione wrote:
>>> $ g++ -std=gnu++0x foo.cpp
>>> /tmp/ccS3vCW7.o:foo.cpp:(.text$_ZNSt11basic_regexIcSt12regex_traitsIcEEC1EPKcj[std::basic_regex<char,
>>>
>>> std::regex_traits<char> >::basic_regex(char const*, unsigned
>>> int)]+0x60): undefined reference to `std::basic_regex<char,
>>> std::regex_traits<char> >::_M_compile()'
>>> collect2: ld returned 1 exit status
>>
>> GCC 4.5 does not have full support for C++0x.  We'll need an upgrade to
>> 4.7 for this to work.
>
> That's surprising. The regex header was in TR1, from back in 2005. I'd
> have expected gcc to support it a long time ago. I'm also surprised to
> see that the header definition present and the libstdc++ implementation
> absent. That's what made me think there was something wrong with the
> toolchain.
>
> Thanks.
>

std::regex is not fully implemented; upgrading to GCC 4.7 won't change 
anything. there are several todo notices in regex header files hinting 
at this.

have a look at boost::regex for the time being; should be close enough 
to std::regex.

Zouzou

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

