delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/03/12/09:32:48

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: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 <ROGER DOT K DOT WELLS AT leidos DOT com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
MIME-Version: 1.0
To: <cygwin AT cygwin DOT com>
Subject: Re: g++4.9.2 fails to compile standard C++11 code
References: <CAJ+GnyeViXtbQ6S=tC6z8XVZgOcoHv6Gi0ww8W1HEG_XKJrhUw AT mail DOT gmail DOT com>
In-Reply-To: <CAJ+GnyeViXtbQ6S=tC6z8XVZgOcoHv6Gi0ww8W1HEG_XKJrhUw@mail.gmail.com>
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 <cmath>
>      #include <iostream>
>
>      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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019