Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CoMISo
Base
Commits
5ee99aa8
Commit
5ee99aa8
authored
Feb 11, 2020
by
Martin Marinov
Committed by
GitHub Enterprise
Feb 11, 2020
Browse files
Fix Linux build errors and warnings (#8)
parent
8be1af6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
5ee99aa8
...
...
@@ -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
)
...
...
Journal/JournalCppDefs.hh
View file @
5ee99aa8
...
...
@@ -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); }
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment