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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=IpGQdtGUH03jaxsmnLV3ENvBnKVuIG+/qLUY++8odZr P2X4N6a2zRTHmcbJB+VMps/o8bp0Tmxtlu0j6RoL4+9mg7wYcMXEZPEdtT+LO/TZ NQjGdUDt1jeZ7SpLuCebf+q8/ghIpkHKvgwW5ym0GIkTt5+binO8eF9SBuKhN4E8 = 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:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=qKy7nZOn5EnyErf08CtCXF2aOIc=; b=VZ5HLJkCfBdcbvILA oEi5Mhq7s097stDjaFTnmKqPJfTaPq8x/6NoPylhOEBIRt0xwVbMSX3iTUHWsCOh AtcEkdRlVbUfCJsbl4ZemTliaSg+jmGEgozUR6s3JVu/2EJk66ZgQQIvlOD2Sz4W rJyfyk1KEZnNTcgvbE+2gDd+ao= 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=0.6 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtpout101.leidos.com Message-Id: <55019565.4060602@leidos.com> Date: Thu, 12 Mar 2015 09:32:21 -0400 From: Roger Wells User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Subject: Re: g++4.9.2 fails to compile standard C++11 code References: In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes On 03/11/2015 06:55 PM, 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 I get the same error on cygwin64 gcc 4.9.2 but it is fine on: Linux, gcc 4.9.2 (Fedora 21) MinGW, 32 bit, gcc 4.7.0 (Windows 7) MinGW, 64 bit, gcc 4.9.0 (Windows 7) HTH -- Roger Wells, P.E. leidos 221 Third St Newport, RI 02840 401-847-4210 (voice) 401-849-1585 (fax) roger DOT k DOT wells AT leidos DOT com -- 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