delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/03/13/04:13:53

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: <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=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: <CAJ+GnyeViXtbQ6S=tC6z8XVZgOcoHv6Gi0ww8W1HEG_XKJrhUw AT mail DOT gmail DOT com> <20150312095559 DOT GA2644 AT dimstar DOT local DOT net>
Date: Fri, 13 Mar 2015 09:13:33 +0100
Message-ID: <CAEhDDbDrfTgUrxOdk3h2T=zn3Edng12vtnrb5csAS7fRYM9PMQ@mail.gmail.com>
Subject: Re: g++4.9.2 fails to compile standard C++11 code
From: Csaba Raduly <rcsaba AT gmail DOT com>
To: cygwin list <cygwin AT cygwin DOT com>

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 <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, 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

- Raw text -


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