<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - clang requires -std=c++11 or -std=c++14 to compile lamda assignments in boost 1.57/1.58"
href="https://llvm.org/bugs/show_bug.cgi?id=23295">23295</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang requires -std=c++11 or -std=c++14 to compile lamda assignments in boost 1.57/1.58
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>2.6
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>howarth.mailing.lists@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>I realize this is actually a boost bug but with the 1.58 release, it has
existed for two boost releases now. The issue is reported at
<a href="https://svn.boost.org/trac/boost/ticket/10785">https://svn.boost.org/trac/boost/ticket/10785</a> and the bug details are that for
boost 1.57 and 1.58, the test case...
#include <iostream>
#include <boost/function.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
int add(int a, int b) {
return a+b;
}
int main() {
boost::function<int (int, int)> fuse = boost::lambda::bind(&add,
boost::lambda::_1, -boost::lambda::_2);
int a = fuse(3,6);
std::cout << a << std::endl;
}
requires -std=c++11 or -std=c++14 to avoid the compiler error seen with the
default -std=c++03. The problem impacts the builds of a number of packages that
use boost and is annoying because forcing -std=c++11 sometimes results in new
compilation issues. In a related question, does clang have any form of pragma
which would allow -std=c++11 to be selectively invoked at the source file
level?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>