From 69adf26aa3e853418002562f623c42a9c7008271 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Fri, 9 Apr 2021 19:50:19 -0700 Subject: Modify googlehash use to account for namespace issues. The namespace declaration for googlehash is a configurable macro that can be disabled. In particular, it is disabled within google, causing compile errors since `dense_hash_map`/`sparse_hash_map` are then in the global namespace instead of in `::google`. Here we play a bit of gynastics to allow for both `google::*_hash_map` and `*_hash_map`, while limiting namespace polution. Symbols within the `::google` namespace are imported into `Eigen::google`. We also remove checks based on `_SPARSE_HASH_MAP_H_`, as this is fragile, and instead require `EIGEN_GOOGLEHASH_SUPPORT` to be defined. --- unsupported/Eigen/SparseExtra | 1 + 1 file changed, 1 insertion(+) (limited to 'unsupported/Eigen/SparseExtra') diff --git a/unsupported/Eigen/SparseExtra b/unsupported/Eigen/SparseExtra index 819cffa27..ba5cbd661 100644 --- a/unsupported/Eigen/SparseExtra +++ b/unsupported/Eigen/SparseExtra @@ -24,6 +24,7 @@ #ifdef EIGEN_GOOGLEHASH_SUPPORT #include + #include #endif /** -- cgit v1.2.3