Неизвестное название типа 'contexpr'C++

Программы на C++. Форум разработчиков
Ответить
Anonymous
 Неизвестное название типа 'contexpr'

Сообщение Anonymous »

Я получаю следующие ошибки, когда запускаю файл команды. Как исправить эту ошибку? < /p>
make file
c++ file.cpp -o file
In file included from file.cpp:2:
In file included from /usr/local/include/armadillo:21:
/usr/local/include/armadillo_bits/compiler_check.hpp:50:4: error: "*** C++11 compiler required; enable C++11 mode in your compiler, or use an earlier version of Armadillo"
50 | #error "*** C++11 compiler required; enable C++11 mode in your compiler, or use an earlier version of Armadillo"
| ^
In file included from file.cpp:2:
In file included from /usr/local/include/armadillo:85:
/usr/local/include/armadillo_bits/arma_forward.hpp:149:12: error: unknown type name 'constexpr'
149 | static constexpr bool is_row = false;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:150:12: error: unknown type name 'constexpr'
150 | static constexpr bool is_col = false;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:151:12: error: unknown type name 'constexpr'
151 | static constexpr bool is_xvec = false;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:161:12: error: unknown type name 'constexpr'
161 | static constexpr bool is_row = false;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:162:12: error: unknown type name 'constexpr'
162 | static constexpr bool is_col = false;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:163:12: error: unknown type name 'constexpr'
163 | static constexpr bool is_xvec = true;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:173:12: error: unknown type name 'constexpr'
173 | static constexpr bool is_row = false;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:174:12: error: unknown type name 'constexpr'
174 | static constexpr bool is_col = true;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:175:12: error: unknown type name 'constexpr'
175 | static constexpr bool is_xvec = false;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:185:12: error: unknown type name 'constexpr'
185 | static constexpr bool is_row = true;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:186:12: error: unknown type name 'constexpr'
186 | static constexpr bool is_col = false;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:187:12: error: unknown type name 'constexpr'
187 | static constexpr bool is_xvec = false;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:197:12: error: unknown type name 'constexpr'
197 | static constexpr bool is_row = T1::is_row;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:198:12: error: unknown type name 'constexpr'
198 | static constexpr bool is_col = T1::is_col;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:199:12: error: unknown type name 'constexpr'
199 | static constexpr bool is_xvec = T1::is_xvec;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:209:12: error: unknown type name 'constexpr'
209 | static constexpr bool is_row = false;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:210:12: error: unknown type name 'constexpr'
210 | static constexpr bool is_col = false;
| ^
/usr/local/include/armadillo_bits/arma_forward.hpp:211:12: error: unknown type name 'constexpr'
211 | static constexpr bool is_xvec = false;
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [file] Error 1


Подробнее здесь: https://stackoverflow.com/questions/796 ... -constexpr
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C++»