You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using visual studio 2017 v141.
Tried to use libnop to serialize a vector of a userdefined class.
The problem arised at NOP_STRUCTURE not being detected as macro, but as a member function of the userdefined class.
This is the output:
1>------ Operación Compilar iniciada: proyecto: TreeStorage, configuración: Debug x64 ------
1>Element.cpp
1>c:\sdk\nop-master\nop\base\encoding.h(784): error C4146: operador unario menos aplicado a un tipo unsigned; el resultado aún no tiene signo
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\element.h(85): warning C4003: no hay suficientes argumentos para la invocación de macro "_NOP_FIRST_ARG" de tipo función
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\element.h(85): warning C4003: no hay suficientes argumentos para la invocación de macro "_NOP_REST_ARG" de tipo función
1>Records.cpp
1>c:\sdk\nop-master\nop\base\encoding.h(784): error C4146: operador unario menos aplicado a un tipo unsigned; el resultado aún no tiene signo
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\element.h(85): warning C4003: no hay suficientes argumentos para la invocación de macro "_NOP_FIRST_ARG" de tipo función
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\element.h(85): warning C4003: no hay suficientes argumentos para la invocación de macro "_NOP_REST_ARG" de tipo función
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\numeric(26): warning C4267: '=': conversión de 'size_t' a '_Ty'; posible pérdida de datos
1> with
1> [
1> _Ty=unsigned int
1> ]
1>c:\sdk\nop-master\nop\base\vector.h(65): note: vea la referencia a la creación de instancias de plantilla de función '_Ty std::accumulate<std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types>>,unsigned int,nop::Encoding<T,void>::Size::<lambda_f56d3b10dc1e1e7371a8b1943862477a>>(const _InIt,const _InIt,_Ty,_Fn)' que se está compilando
1> with
1> [
1> _Ty=unsigned int,
1> T=std::vector<Element,std::allocator>,
1> _InIt=std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types>>,
1> _Fn=nop::Encoding<std::vector<Element,std::allocator>,void>::Size::<lambda_f56d3b10dc1e1e7371a8b1943862477a>
1> ]
1>c:\sdk\nop-master\nop\base\vector.h(59): note: durante la compilación de la función miembro de plantilla clase de 'size_t nop::Encoding<T,void>::Size(const std::vector<Element,std::allocator<_Ty>> &)'
1> with
1> [
1> T=std::vector<Element,std::allocator>,
1> _Ty=Element
1> ]
1>c:\sdk\nop-master\nop\base\serializer.h(56): note: vea la referencia a la creación de instancias de plantilla de función 'size_t nop::Encoding<T,void>::Size(const std::vector<Element,std::allocator<_Ty>> &)' que se está compilando
1> with
1> [
1> T=std::vector<Element,std::allocator>,
1> _Ty=Element
1> ]
1>c:\sdk\nop-master\nop\base\serializer.h(178): note: vea la referencia a la creación de instancias de plantilla clase de 'nop::Encoding<T,void>' que se está compilando
1> with
1> [
1> T=std::vector<Element,std::allocator>
1> ]
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\records.cpp(80): note: vea la referencia a la creación de instancias de plantilla de función 'nop::Status nop::Deserializer::Read<std::vector<Element,std::allocator<_Ty>>>(T *)' que se está compilando
1> with
1> [
1> _Ty=Element,
1> T=std::vector<Element,std::allocator>
1> ]
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\records.cpp(80): note: vea la referencia a la creación de instancias de plantilla de función 'nop::Status nop::Deserializer::Read<std::vector<Element,std::allocator<_Ty>>>(T *)' que se está compilando
1> with
1> [
1> _Ty=Element,
1> T=std::vector<Element,std::allocator>
1> ]
1>main.cpp
1>c:\sdk\nop-master\nop\base\encoding.h(784): error C4146: operador unario menos aplicado a un tipo unsigned; el resultado aún no tiene signo
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\element.h(85): warning C4003: no hay suficientes argumentos para la invocación de macro "_NOP_FIRST_ARG" de tipo función
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\element.h(85): warning C4003: no hay suficientes argumentos para la invocación de macro "_NOP_REST_ARG" de tipo función
The text was updated successfully, but these errors were encountered:
libnop does not officially support MSVC at this time. One reason for this is that MSVC, by default, does not support certain preprocessor macro features that the library depends on.
My understanding is that MSVC has an option for compatibility with GNU style macros, which might work with libnop. At some point we may add official support for this option, however, I'm not sure when that will be. I would consider pull requests, though.
Hi!
I'm using visual studio 2017 v141.
Tried to use libnop to serialize a vector of a userdefined class.
The problem arised at NOP_STRUCTURE not being detected as macro, but as a member function of the userdefined class.
This is the output:
1>------ Operación Compilar iniciada: proyecto: TreeStorage, configuración: Debug x64 ------
1>Element.cpp
1>c:\sdk\nop-master\nop\base\encoding.h(784): error C4146: operador unario menos aplicado a un tipo unsigned; el resultado aún no tiene signo
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\element.h(85): warning C4003: no hay suficientes argumentos para la invocación de macro "_NOP_FIRST_ARG" de tipo función
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\element.h(85): warning C4003: no hay suficientes argumentos para la invocación de macro "_NOP_REST_ARG" de tipo función
1>Records.cpp
1>c:\sdk\nop-master\nop\base\encoding.h(784): error C4146: operador unario menos aplicado a un tipo unsigned; el resultado aún no tiene signo
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\element.h(85): warning C4003: no hay suficientes argumentos para la invocación de macro "_NOP_FIRST_ARG" de tipo función
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\element.h(85): warning C4003: no hay suficientes argumentos para la invocación de macro "_NOP_REST_ARG" de tipo función
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\numeric(26): warning C4267: '=': conversión de 'size_t' a '_Ty'; posible pérdida de datos
1> with
1> [
1> _Ty=unsigned int
1> ]
1>c:\sdk\nop-master\nop\base\vector.h(65): note: vea la referencia a la creación de instancias de plantilla de función '_Ty std::accumulate<std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types>>,unsigned int,nop::Encoding<T,void>::Size::<lambda_f56d3b10dc1e1e7371a8b1943862477a>>(const _InIt,const _InIt,_Ty,_Fn)' que se está compilando
1> with
1> [
1> _Ty=unsigned int,
1> T=std::vector<Element,std::allocator>,
1> _InIt=std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types>>,
1> _Fn=nop::Encoding<std::vector<Element,std::allocator>,void>::Size::<lambda_f56d3b10dc1e1e7371a8b1943862477a>
1> ]
1>c:\sdk\nop-master\nop\base\vector.h(59): note: durante la compilación de la función miembro de plantilla clase de 'size_t nop::Encoding<T,void>::Size(const std::vector<Element,std::allocator<_Ty>> &)'
1> with
1> [
1> T=std::vector<Element,std::allocator>,
1> _Ty=Element
1> ]
1>c:\sdk\nop-master\nop\base\serializer.h(56): note: vea la referencia a la creación de instancias de plantilla de función 'size_t nop::Encoding<T,void>::Size(const std::vector<Element,std::allocator<_Ty>> &)' que se está compilando
1> with
1> [
1> T=std::vector<Element,std::allocator>,
1> _Ty=Element
1> ]
1>c:\sdk\nop-master\nop\base\serializer.h(178): note: vea la referencia a la creación de instancias de plantilla clase de 'nop::Encoding<T,void>' que se está compilando
1> with
1> [
1> T=std::vector<Element,std::allocator>
1> ]
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\records.cpp(80): note: vea la referencia a la creación de instancias de plantilla de función 'nop::Status nop::Deserializer::Read<std::vector<Element,std::allocator<_Ty>>>(T *)' que se está compilando
1> with
1> [
1> _Ty=Element,
1> T=std::vector<Element,std::allocator>
1> ]
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\records.cpp(80): note: vea la referencia a la creación de instancias de plantilla de función 'nop::Status nop::Deserializer::Read<std::vector<Element,std::allocator<_Ty>>>(T *)' que se está compilando
1> with
1> [
1> _Ty=Element,
1> T=std::vector<Element,std::allocator>
1> ]
1>main.cpp
1>c:\sdk\nop-master\nop\base\encoding.h(784): error C4146: operador unario menos aplicado a un tipo unsigned; el resultado aún no tiene signo
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\element.h(85): warning C4003: no hay suficientes argumentos para la invocación de macro "_NOP_FIRST_ARG" de tipo función
1>c:\users\jmichel\source\repos\vitalzero\requis\treestorage\element.h(85): warning C4003: no hay suficientes argumentos para la invocación de macro "_NOP_REST_ARG" de tipo función
The text was updated successfully, but these errors were encountered: