Commit 5ee99aa8 authored by Martin Marinov's avatar Martin Marinov Committed by GitHub Enterprise

Fix Linux build errors and warnings (#8)

parent 8be1af6c
......@@ -41,7 +41,7 @@ base_add_subdir(Utils)
target_include_directories(${output_lib} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
#Various useful defaults.
set_target_properties(${output_lib} PROPERTIES CXX_VISIBILITY_PRESET hidden)
# set_target_properties(${output_lib} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${output_lib} PROPERTIES C_VISIBILITY_PRESET hidden)
set_target_properties(${output_lib} PROPERTIES C_STANDARD 99)
set_target_properties(${output_lib} PROPERTIES CXX_STANDARD 14)
......
......@@ -45,6 +45,28 @@ template <class T> String type_name()
#else // JOURNAL_USE_BOOST
/*!
Override this for any type that is used as output data for C/C++ journals,
use the JOURNAL_TYPE_NAME() helper macro.
*/
template <typename T>
typename std::enable_if<!std::is_pointer<T>::value &&
!std::is_reference<T>::value && !std::is_const<T>::value, String>::type
type_name();
//! Forward declaration of the overload for pointer
template <typename T>
typename std::enable_if<std::is_pointer<T>::value, String>::type type_name();
//! Forward declaration of the overload for reference
template <typename T>
typename std::enable_if<std::is_reference<T>::value, String>::type type_name();
//! Forward declaration of the overload for const
template <typename T>
typename std::enable_if<std::is_const<T>::value, String>::type type_name();
template <typename T>
typename std::enable_if<std::is_pointer<T>::value, String>::type type_name()
{
......@@ -68,15 +90,6 @@ typename std::enable_if<std::is_const<T>::value, String>::type type_name()
return str + " const";
}
/*!
Override this for any type that is used as output data for C/C++ journals, you
can use the JOURNAL_TYPE_NAME() helper macro.
*/
template <typename T>
typename std::enable_if<!std::is_pointer<T>::value &&
!std::is_reference<T>::value && !std::is_const<T>::value, String>::type
type_name();
#define JOURNAL_TYPE_NAME(TYPE) \
template <> String type_name<TYPE>() { return String(#TYPE); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment