Some older compilers that have a -std=c++0x flag and that we deem
C++11 compatible do apparently not support std::is_default_constructible,
despite the fact that they support std::is_base_of. Therefore, avoid
the use of it. This does not matter here because just a few lines further
down, we call 'make_shared<T>()' which already requires default
constructibility, and so the user will get an error one way or the other.
While there, also ensure that we use the correct include file.
#include <vector>
#include <map>
-#include <typeinfo>
+#include <type_traits>
DEAL_II_NAMESPACE_OPEN
* in different parts of the domain.
*
* @pre The type @p T needs to either equal @p DataType, or be a class derived
- * from @p DataType.
+ * from @p DataType. @p T needs to be default constructible.
*/
template<typename T=DataType>
void initialize(const CellIteratorType &cell,
{
static_assert(std::is_base_of<DataType, T>::value,
"User's T class should be derived from user's DataType class");
- static_assert(std::is_default_constructible<T>::value,
- "Class T requires default-constructible elements");
if (map.find(cell) == map.end())
{
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams