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

@@ -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 {
/*!