Skip to content

Build errors with VS 15.3 and /permissive- conformance switch #626

Description

@lmdsp

With Visual Studio 15.3 which has just been released, enabling the /permissive- conformance switch results in build errors.
This switch is useful to adhere strictly to the C++ standard, and it also helps enforcing cross-platform compatibility, reducing the chance to write code that will build under VS but not under clang/gcc for example.

It seems MS have enforced stricter rules as this was building fine in VS 15.2.

The error(s) appear in example\cpp11\non_def_con_class.cpp:

non_def_con_class.cpp
\include\msgpack/v1/object_fwd.hpp(66): error C2039: 'value': is not a member of 'msgpack::v1::type'
\include\msgpack/v1/adaptor/detail/cpp11_define_map.hpp(22): note: see declaration of 'msgpack::v1::type'
\include\msgpack/v2/object_fwd.hpp(97): note: see reference to class template instantiation 'msgpack::v1::has_as<T>' being compiled
1>        with
1>        [
1>            T=int
1>        ]
example\cpp11\non_def_con_class.cpp(37): note: see reference to class template instantiation 'msgpack::v2::has_as<int>' being compiled
\include\msgpack/v1/object_fwd.hpp(66): error C2065: 'value': undeclared identifier
\include\msgpack/v1/object_fwd.hpp(66): error C2131: expression did not evaluate to a constant
\include\msgpack/v1/object_fwd.hpp(66): note: failure was caused by non-constant arguments or reference to a non-constant symbol
\include\msgpack/v1/object_fwd.hpp(66): note: see usage of 'value'
\include\msgpack/v2/object_fwd.hpp(98): error C2039: 'value': is not a member of 'msgpack::v2::type'
\include\msgpack/v2/adaptor/detail/cpp11_define_map_decl.hpp(19): note: see declaration of 'msgpack::v2::type'
\include\msgpack/v2/object_fwd.hpp(98): error C2065: 'value': undeclared identifier
\include\msgpack/v2/object_fwd.hpp(98): error C2131: expression did not evaluate to a constant
\include\msgpack/v2/object_fwd.hpp(98): note: failure was caused by non-constant arguments or reference to a non-constant symbol
\include\msgpack/v2/object_fwd.hpp(98): note: see usage of 'value'
example\cpp11\non_def_con_class.cpp(37): warning C4305: 'specialization': truncation from 'const bool *' to 'bool'
example\cpp11\non_def_con_class.cpp(37): error C2672: 'msgpack::v1::object::as': no matching overloaded function found
example\cpp11\non_def_con_class.cpp(37): error C2770: invalid explicit template argument(s) for 'std::enable_if<msgpack::v2::has_as<T>::value,T>::type msgpack::v1::object::as(void) const'
\include\msgpack/v1/object_fwd.hpp(121): note: see declaration of 'msgpack::v1::object::as'
1>Done building project "non_def_con_class.vcxproj" -- FAILED.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions