diff --git a/include/eigenpy/eigen-from-python.hpp b/include/eigenpy/eigen-from-python.hpp
index cf12a9f0d811acc34140b9eacf872b12759c74bc..a19938d2e6a05aeb9c32b915a17603a484de32c6 100644
--- a/include/eigenpy/eigen-from-python.hpp
+++ b/include/eigenpy/eigen-from-python.hpp
@@ -42,10 +42,10 @@ namespace eigenpy
     {
       typedef Eigen::Ref<MatType,Options,Stride> RefType;
 #if BOOST_VERSION / 100 % 1000 >= 77
-      typedef typename aligned_storage<
+      typedef typename ::boost::python::detail::aligned_storage<
           ::boost::python::detail::referent_size<RefType&>::value,
           ::boost::alignment_of<RefType&>::value
-      >::type type;
+      >::type AlignedStorage;
 #else
       typedef ::boost::python::detail::aligned_storage<
           ::boost::python::detail::referent_size<RefType&>::value