X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; q=dns; s=default; b=jc Ti2/nsyUL0t0MRgv2Om8uZFkyI+i9qOY/eqzwOUILkwHFmWo/bBLDdlfJcK03zxP QzoXfJW8pzxzC0spMCAwY2rOmmAqLjILerMLVeWG17wERjIlYi1p1ueFMQrolRlO li5F6YrJkLKj/wFWaH2VJDZkWo+Mqvb2q9X4A5U9c= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; s=default; bh=+G8YebcC /J2tZZnyccXsoGFkC3E=; b=ybmkxtu1Jhh+sgZnTCUwWpBts5RMNEqSScG8eHBO eiDFQtCVLUaARMyVqNYXvacJyAdmDlSHjdUfSFVxg0xPxGcNc+aCjmdx5ED/Zrm6 UW4TKcz8C4iEJif7qs2cIQ4mpXCoiDhdGwwAYcslAQg/GKR3G8Tp06ozY6cuPEeD QLU= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-wi0-f169.google.com MIME-Version: 1.0 X-Received: by 10.180.86.201 with SMTP id r9mr138185114wiz.56.1426234413993; Fri, 13 Mar 2015 01:13:33 -0700 (PDT) In-Reply-To: <20150312095559.GA2644@dimstar.local.net> References: <20150312095559 DOT GA2644 AT dimstar DOT local DOT net> Date: Fri, 13 Mar 2015 09:13:33 +0100 Message-ID: Subject: Re: g++4.9.2 fails to compile standard C++11 code From: Csaba Raduly To: cygwin list Content-Type: text/plain; charset=ISO-8859-1 Hi On Thu, Mar 12, 2015 at 10:55 AM, Duncan Roe wrote: > On Wed, Mar 11, 2015 at 06:55:16PM -0400, Vlad Gheorghiu wrote: >> The following code fails to compile under latest cygwin, Windows 7, >> g++4.9.2. Compiled with g++ -std=c++11 test.cpp. The compiler >> complains that std::log2 is not a member of std. >> >> #include >> #include >> >> int main() >> { >> auto x = std::log2(10); >> std::cout << x << std::endl; >> } >> >> >> Verbatim error: >> >> g++ -std=c++11 test.cpp >> test.cpp: In function 'int main()': >> test.cpp:5:11: error: 'log2' is not a member of 'std' >> auto x = std::log2(10); >> ^ >> test.cpp:5:11: note: suggested alternative: >> In file included from >> /usr/lib/gcc/i686-pc-cygwin/4.9.2/include/c++/cmath:44:0, >> from test.cpp:1: >> /usr/include/math.h:305:15: note: ???log2??? >> extern double log2 _PARAMS((double)); >> > FWIW, this program works fine under Linux / gcc4.8.2: ISTR a discussion about some C++11 features being configured away due to Cygwin's lack of some C library functions ("to_string not a member of std"): https://sourceware.org/ml/cygwin/2015-01/msg00245.html Your issue may be related (I'm guessing here because I don't have Cygwin at hand right now). Csaba -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ The Tao of math: The numbers you can count are not the real numbers. Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds -- 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