diff --git a/include/dmlc/common.h b/include/dmlc/common.h index 9aead8c5b1..b4b2fdfe18 100644 --- a/include/dmlc/common.h +++ b/include/dmlc/common.h @@ -10,6 +10,7 @@ #include #include #include +#include #include "./logging.h" namespace dmlc { diff --git a/include/dmlc/concurrency.h b/include/dmlc/concurrency.h index 754cf5aa28..1b73443316 100644 --- a/include/dmlc/concurrency.h +++ b/include/dmlc/concurrency.h @@ -14,6 +14,7 @@ #include #include #include +#include #include "dmlc/base.h" namespace dmlc { diff --git a/include/dmlc/data.h b/include/dmlc/data.h index 16e0667322..a6ac19c8ed 100644 --- a/include/dmlc/data.h +++ b/include/dmlc/data.h @@ -56,7 +56,7 @@ template class DataIter { public: /*! \brief destructor */ - virtual ~DataIter(void) {} + virtual ~DataIter(void) DMLC_THROW_EXCEPTION {} /*! \brief set before first of the item */ virtual void BeforeFirst(void) = 0; /*! \brief move to next item */ diff --git a/include/dmlc/io.h b/include/dmlc/io.h index 5e76e4c6e2..ac0293fa2a 100644 --- a/include/dmlc/io.h +++ b/include/dmlc/io.h @@ -230,7 +230,7 @@ class InputSplit { return NextChunk(out_chunk); } /*! \brief destructor*/ - virtual ~InputSplit(void) {} + virtual ~InputSplit(void) DMLC_THROW_EXCEPTION {} /*! * \brief reset the Input split to a certain part id, * The InputSplit will be pointed to the head of the new specified segment. diff --git a/include/dmlc/memory.h b/include/dmlc/memory.h index 3a2b9b0798..00801122e8 100644 --- a/include/dmlc/memory.h +++ b/include/dmlc/memory.h @@ -7,6 +7,8 @@ #define DMLC_MEMORY_H_ #include +#include +#include #include "./base.h" #include "./logging.h" #include "./thread_local.h" diff --git a/include/dmlc/optional.h b/include/dmlc/optional.h index dedbc74781..df139d4c5e 100644 --- a/include/dmlc/optional.h +++ b/include/dmlc/optional.h @@ -25,7 +25,7 @@ struct nullopt_t { explicit nullopt_t(int a) {} #else /*! \brief dummy constructor */ - constexpr nullopt_t(int a) {} + explicit constexpr nullopt_t(int a) {} #endif }; diff --git a/include/dmlc/thread_group.h b/include/dmlc/thread_group.h index 626142f302..f01b1af90d 100644 --- a/include/dmlc/thread_group.h +++ b/include/dmlc/thread_group.h @@ -13,6 +13,8 @@ #include #include #include +#include +#include #include #include #if defined(DMLC_USE_CXX14) || __cplusplus > 201103L /* C++14 */