Compile Error When Testing with MSVC Using /std:c++latest
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 48/100
Línea de trabajo
Comienza con test/test_actions.cpp en las líneas 187, 194, 203 y 210; después, reproduce el fallo de la prueba de xpressive usando MSVC con /std:c++latest. Compara los diagnósticos del fallo con el registro de pruebas proporcionado y verifica que la prueba se compile y pase con las expresiones actualizadas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi, I work on Microsoft Visual C++ testing, where we regularly build popular open-source projects, including Boost, with development builds of our compiler and libraries with some particular CL options such as /std:c++latest.
Feel free to close this issue if there is no plan of supporting /std:c++latest in the future. This change in /std:c++latest will be released soon in next VS update.
``
While building and testing Boost from source using /std:c++latest, I encountered the following error in the `xpressive` test:
libs\xpressive\test\test_actions.cpp(187): error C2676: binary '[': 'const boost::proto::exprns_::expr<Tag,Args,2>' does not define this operator or a conversion to a type acceptable to the predefined operator
with
[
Tag=boost::proto::tagns_::tag::shift_right,
Args=boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,boost::proto::argsns_::term<const char &>,0>,boost::xpressive::basic_regex<std::_String_const_iterator<std::_String_val<std::_Simple_types<char>>>> &>
]
This error was encountered in:
test\test_actions.cpp (Line 187, 194, 203, 210)
In C++23, the definition of a subscript-expression was changed so that it now takes an expression-list so now a top-level ',' is a separator. The fix is to wrap the expression in parentheses. For example in test_actions.cpp:
term = factor >> *(
('*' >> factor)
[ right = top(stack)
, pop(stack)
, left = top(stack)
, pop(stack)
, push(stack, left * right)
]
| ('/' >> factor)
[ right = top(stack)
, pop(stack)
, left = top(stack)
, pop(stack)
, push(stack, left / right)
]
);
expression = term >> *(
('+' >> term)
[ right = top(stack)
, pop(stack)
, left = top(stack)
, pop(stack)
, push(stack, left + right)
]
| ('-' >> term)
[ right = top(stack)
, pop(stack)
, left = top(stack)
, pop(stack)
, push(stack, left - right)
]
);
should be changed to:
term = factor >> *(
('*' >> factor)
[ (right = top(stack) // added opening parenthesis
, pop(stack)
, left = top(stack)
, pop(stack)
, push(stack, left * right)) // added closing parenthesis
]
| ('/' >> factor)
[ (right = top(stack)
, pop(stack)
, left = top(stack)
, pop(stack)
, push(stack, left / right))
]
);
expression = term >> *(
('+' >> term)
[ (right = top(stack)
, pop(stack)
, left = top(stack)
, pop(stack)
, push(stack, left + right))
]
| ('-' >> term)
[ (right = top(stack)
, pop(stack)
, left = top(stack)
, pop(stack)
, push(stack, left - right))
]
);
Test log:
boost_xpressive_test_log.txt
- Lenguaje dominante
- C++
- Estrellas
- 19
- Forks
- 40
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de boostorg/xpressive
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
-
Macro definitionsAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Todos los issues de boostorg/xpressive
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
pocoproject/poco#5626 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Issue-Bug Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
microsoft/winget-cli#6645 ·
Los mantenedores suelen responder en 2 días
-
cleanup help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ESPresense/ESPresense#2602 ·
Los mantenedores suelen responder en 1 día