Skip to content

Commit c6cda31

Browse files
jcarpentproyan
authored andcommitted
core: add safe guard to avoid double specialization
1 parent 9c6836a commit c6cda31

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

include/pycppad/fwd.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include <cppad/cppad.hpp>
1515
#include <Eigen/Core>
1616

17+
#ifndef PYCPPAD_EXCLUDE_EIGEN_NUMTRAITS_SPECIALIZATION
18+
1719
namespace Eigen
1820
{
1921
template <class Base> struct NumTraits< CppAD::AD<Base> >
@@ -67,4 +69,6 @@ namespace Eigen
6769
};
6870
} // namespace Eigen
6971

72+
#endif // ifndef PYCPPAD_EXCLUDE_EIGEN_NUMTRAITS_SPECIALIZATION
73+
7074
#endif // ifndef __pycppad_fwd_hpp__

0 commit comments

Comments
 (0)