Skip to content

Commit

Permalink
Merge pull request #705 from alicevision/fix/buildConflictPrettyprint
Browse files Browse the repository at this point in the history
Workaround for a build incompatibility between prettyprint and eigen
  • Loading branch information
fabiencastan authored Oct 22, 2019
2 parents 58e0763 + de49312 commit c04ef2d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/aliceVision/prettyprint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,20 @@ bucket_print(const T & m, typename T::size_type n)
// Main magic entry point: An overload snuck into namespace std.
// Can we do better?

namespace Eigen {
template <typename T>
class EigenBase;
}

namespace std
{
// Prints a container to the stream using default delimiters
template <typename T>
struct is_eigen_object : std::is_base_of<Eigen::EigenBase<T>, T>
{};

template<typename T, typename TChar, typename TCharTraits>
inline typename enable_if< ::pretty_print::is_container<T>::value,
inline typename enable_if< ::pretty_print::is_container<T>::value && !is_eigen_object<T>::value,
basic_ostream<TChar, TCharTraits> &>::type
operator<<(basic_ostream<TChar, TCharTraits> & stream, const T & container)
{
Expand Down

0 comments on commit c04ef2d

Please sign in to comment.