Date: Thu, 29 May 2014 15:19:27 -0400 From: Lowell Gilbert <freebsd-ports-local@be-well.ilk.org> To: hhh@sdf.org Cc: freebsd-ports@freebsd.org Subject: Re: g++ cannot find std::stoi Message-ID: <44k3942y0w.fsf@be-well.ilk.org> In-Reply-To: <874n09tr87.fsf@gmail.com> (hhh@sdf.org's message of "Thu, 29 May 2014 01:31:52 %2B0200") References: <874n09tr87.fsf@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
hhh@sdf.org writes: > I'm trying to compile OpenCog [1] using g++47, but get an error about > missing std::stoi. > > I have attached a micro-example [2] that generates the same error, if I > try to compile it with: > > % g++47 -std=c++11 s.cc > s.cc: In function 'int main()': > s.cc:8:13: error: 'stoi' is not a member of 'std' > > > There are no problems neither with clang nor with g++ on Debian: > > % clang++ -std=c++11 s.cc > > > > What am I missing? An old libc++ bug in gcc. You need a newer compiler. The default compiler on recent (I think 10.0 and up) is a version of clang that will get this right.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44k3942y0w.fsf>