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_
|
#define XGBOOST_TREE_UPDATER_H_
|
||||||
|
|
||||||
#include <dmlc/registry.h>
|
#include <dmlc/registry.h>
|
||||||
|
#include <functional>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -16,10 +17,6 @@
|
|||||||
#include "./data.h"
|
#include "./data.h"
|
||||||
#include "./tree_model.h"
|
#include "./tree_model.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <functional>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace xgboost {
|
namespace xgboost {
|
||||||
/*!
|
/*!
|
||||||
* \brief interface of tree update module, that performs update of a tree.
|
* \brief interface of tree update module, that performs update of a tree.
|
||||||
|
|||||||
@ -17,16 +17,13 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
#if DMLC_ENABLE_STD_THREAD
|
#if DMLC_ENABLE_STD_THREAD
|
||||||
#include <dmlc/concurrency.h>
|
#include <dmlc/concurrency.h>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <functional>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace xgboost {
|
namespace xgboost {
|
||||||
namespace data {
|
namespace data {
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user