Fix compilation on OS X with GCC 7 (#2256)
* Fix compilation on OS X with GCC 7
Compilation failed with
In file included from src/tree/tree_updater.cc:6:0:
include/xgboost/tree_updater.h:75:46: error: 'function' is not a member of 'std'
std::function<TreeUpdater* ()> > {
caused by a missing <functional> include.
* Fixed another occurence of that issue spotted by @ClimberPG
This commit is contained in:
parent
3ca64ffa02
commit
e5e721722e
@ -9,6 +9,7 @@
|
||||
#define XGBOOST_TREE_UPDATER_H_
|
||||
|
||||
#include <dmlc/registry.h>
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <string>
|
||||
@ -16,10 +17,6 @@
|
||||
#include "./data.h"
|
||||
#include "./tree_model.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <functional>
|
||||
#endif
|
||||
|
||||
namespace xgboost {
|
||||
/*!
|
||||
* \brief interface of tree update module, that performs update of a tree.
|
||||
|
||||
@ -17,16 +17,13 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
|
||||
#if DMLC_ENABLE_STD_THREAD
|
||||
#include <dmlc/concurrency.h>
|
||||
#include <thread>
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <functional>
|
||||
#endif
|
||||
|
||||
namespace xgboost {
|
||||
namespace data {
|
||||
/*!
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user