Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static assertion failed: std::vector must have the same value_type as its allocator #6

Open
a3adam opened this issue Jun 12, 2021 · 0 comments

Comments

@a3adam
Copy link

a3adam commented Jun 12, 2021

When compiling the code, I got the following error.

Scanning dependencies of target vortexje 
[ 27%] Building CXX object vortexje/CMakeFiles/vortexje.dir/solver.cpp.o
In file included from /usr/include/c++/9/vector:67,
                 from /usr/include/eigen3/Eigen/SparseCore:15,
                 from /usr/include/eigen3/Eigen/IterativeLinearSolvers:11,
                 from /home/adam/vortexje/vortexje/solver.cpp:23:
/usr/include/c++/9/bits/stl_vector.h: In instantiation of ‘class std::vector<std::vector<Eigen::Matrix<double, 3, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 1> > >, Eigen::aligned_allocator<std::vector<Eigen::Matrix<double, 3, 1> > > >’:
/home/adam/vortexje/vortexje/solver.cpp:1003:116:   required from here
/usr/include/c++/9/bits/stl_vector.h:401:64: error: static assertion failed: std::vector must have the same value_type as its allocator
  401 |       static_assert(is_same<typename _Alloc::value_type, _Tp>::value,
      |                                                                ^~~~~
make[2]: *** [vortexje/CMakeFiles/vortexje.dir/build.make:76: vortexje/CMakeFiles/vortexje.dir/solver.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:533: vortexje/CMakeFiles/vortexje.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

The compiler versions posted when executing the cmake command are given below.

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "3.2.2")
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.17") found components: doxygen dot
-- Configuring done
-- Generating done
-- Build files have been written to: /home/adam/vortexje/build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant