C++11 transition: get compilation to pass again
...but we have still 12 test failures
This commit is contained in:
parent
2e9467fe76
commit
f826ab1ee5
3 changed files with 20 additions and 15 deletions
|
|
@ -28,6 +28,7 @@
|
|||
#define TIMELINE_LAYOUT_HELPER_HPP
|
||||
|
||||
#include "gui/gtk-lumiera.hpp"
|
||||
#include "lib/util-coll.hpp"
|
||||
#include "lib/tree.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
|
@ -366,7 +367,10 @@ protected:
|
|||
* the update_layout method.
|
||||
* @see update_layout()
|
||||
*/
|
||||
std::map<std::weak_ptr<timeline::Track>, Gdk::Rectangle>
|
||||
std::map< std::weak_ptr<timeline::Track>
|
||||
, Gdk::Rectangle
|
||||
, ::util::WeakPtrComparator
|
||||
>
|
||||
headerBoxes;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -25,14 +25,14 @@
|
|||
#include "lib/util-foreach.hpp"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/lambda/lambda.hpp>
|
||||
#include <boost/lambda/bind.hpp>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <set>
|
||||
|
||||
using std::cout;
|
||||
using std::string;
|
||||
using std::function;
|
||||
|
||||
|
||||
|
||||
|
|
@ -40,25 +40,26 @@ namespace util {
|
|||
namespace test {
|
||||
|
||||
using util::for_each;
|
||||
using boost::lambda::_1;
|
||||
using boost::lambda::bind;
|
||||
using boost::lexical_cast;
|
||||
|
||||
|
||||
using IntSet = std::set<uint>;
|
||||
|
||||
template<class COLL>
|
||||
void
|
||||
show (COLL const& coll)
|
||||
show (IntSet const& coll)
|
||||
{
|
||||
cout << "[ ";
|
||||
for_each (coll, cout << _1 << ", ");
|
||||
for_each (coll, [](uint elm) { cout << elm << ", "; });
|
||||
cout << "]\n";
|
||||
}
|
||||
|
||||
bool
|
||||
killerselector (string description, uint candidate)
|
||||
function<bool(uint)>
|
||||
select_match (string description)
|
||||
{
|
||||
return string::npos != description.find( lexical_cast<string> (candidate));
|
||||
return [&](uint candidate)
|
||||
{
|
||||
return string::npos != description.find( lexical_cast<string> (candidate));
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -87,11 +88,11 @@ namespace test {
|
|||
void
|
||||
test_remove (string elems_to_remove)
|
||||
{
|
||||
std::set<uint> theSet;
|
||||
IntSet theSet;
|
||||
for (int i=0; i<10; ++i)
|
||||
theSet.insert (i);
|
||||
|
||||
util::remove_if (theSet, bind( killerselector, elems_to_remove, _1));
|
||||
util::remove_if (theSet, select_match(elems_to_remove));
|
||||
|
||||
cout << "removed " << elems_to_remove << " ---> ";
|
||||
show (theSet);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace test {
|
|||
|
||||
|
||||
// need explicit definitions here, because we use
|
||||
// tr1/functional and boost::lambda at the same time
|
||||
// <functional> and boost::lambda at the same time
|
||||
std::_Placeholder<1> _1;
|
||||
boost::lambda::placeholder1_type _1_;
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ namespace test {
|
|||
check_ref_argument_bind (CO coll)
|
||||
{
|
||||
ANNOUNCE (assign_to_input);
|
||||
function<bool(int,int,int)> fun2(function2);
|
||||
function<bool(int,int,int&)> fun2(function2);
|
||||
|
||||
for_each (coll, function2, 5, 5, _1 ); _NL_
|
||||
for_each (coll, &function2,5, 5, _1 ); _NL_
|
||||
|
|
|
|||
Loading…
Reference in a new issue