Skip to content
Snippets Groups Projects
Commit b9705612 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[common.traits] add is_printable

parent 629350ea
No related branches found
No related tags found
1 merge request!20Update bindings
......@@ -329,6 +329,20 @@ struct is_hashable<T, typename std::enable_if<!!sizeof(std::declval<std::hash<T>
#endif
// from https://github.com/mnafees/cpp_utils/blob/master/is_printable/is_printable.hpp
template <typename _Tp, typename dummy = void>
struct is_printable : std::false_type
{};
template <typename _Tp>
struct is_printable<
_Tp,
typename std::enable_if_t<
std::is_same<std::remove_reference_t<decltype(std::cout << std::declval<_Tp>())>, std::ostream>::value>>
: std::true_type
{};
template <class T>
struct is_complex : public std::false_type
{};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment