Subject: [Boost-bugs] [Boost C++ Libraries] #11902: bind placeholder _1 is not defined
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-01-11 12:08:47
#11902: bind placeholder _1 is not defined
--------------------------+------------------------------
Reporter: zimmermann@⦠| Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.60.0
Severity: Problem | Keywords:
--------------------------+------------------------------
bind placeholder _1 is not defined in version 1.60.0 .
Example
{{{
#include <boost/bind/bind.hpp>
int f(int a, int b) { return a + b; }
int main(void)
{
int x = 1;
int a = boost::bind(f, 5, _1)(x);
return 0;
}
}}}
Compiler output:
{{{
bind_error.cpp: In function âint main()â:
bind_error.cpp:11:29: error: â_1â was not declared in this scope
int a = boost::bind(f, 5, _1)(x);
^
bind_error.cpp:11:29: note: suggested alternative:
In file included from
/home/projekte/libwinforwiss/boost/boost_1_60_0/boost/bind/bind.hpp:2247:0,
from bind_error.cpp:1:
/home/projekte/libwinforwiss/boost/boost_1_60_0/boost/bind/placeholders.hpp:46:38:
note: âboost::placeholders::_1â
BOOST_STATIC_CONSTEXPR boost::arg<1> _1;
}}}
Replacing _1 with boost::placeholders::_1 works for 1.60.0 , but not
for 1.59.0.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11902> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC