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:
Sergei Lebedev
2017-05-20 07:04:07 +02:00
committed by Tianqi Chen
parent 3ca64ffa02
commit e5e721722e
2 changed files with 2 additions and 8 deletions

View File

@@ -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.