id summary reporter owner description type status milestone component version severity resolution keywords cc 13076 Compilation error on MSVC2015+ on base_from_member used in a class with __declspec(dllexport) mwu No-Maintainer "Consider the following code: {{{ //#define BOOST_NO_CXX11_VARIADIC_TEMPLATES #include class __declspec(dllexport) Foo : public boost::base_from_member { public: }; }}} It fails to compile with the following error: {{{ example.cpp /opt/compiler-explorer/libs/boost_1_64_0\boost/utility/base_from_member.hpp(135): error C2061: syntax error: identifier 'T' /opt/compiler-explorer/libs/boost_1_64_0\boost/utility/base_from_member.hpp(135): note: This diagnostic occurred in the compiler generated function 'boost::base_from_member::base_from_member(T &&...) noexcept()' /opt/compiler-explorer/libs/boost_1_64_0\boost/utility/base_from_member.hpp(136): error C2056: illegal expression /opt/compiler-explorer/libs/boost_1_64_0\boost/utility/base_from_member.hpp(136): note: This diagnostic occurred in the compiler generated function 'boost::base_from_member::base_from_member(T &&...) noexcept()' /opt/compiler-explorer/libs/boost_1_64_0\boost/utility/base_from_member.hpp(135): error C2660: 'operator new': function does not take 2 arguments /opt/compiler-explorer/libs/boost_1_64_0\boost/utility/base_from_member.hpp(135): note: while compiling class template member function 'boost::base_from_member::base_from_member<,void>(void) noexcept()' /opt/compiler-explorer/libs/boost_1_64_0\boost/utility/base_from_member.hpp(135): error C2056: illegal expression Microsoft (R) C/C++ Optimizing Compiler Version 19.10.25017 for x64 Copyright (C) Microsoft Corporation. All rights reserved. Compiler exited with result code 2 }}} See https://godbolt.org/g/CqFg8t If I add the `BOOST_NO_CXX11_VARIADIC_TEMPLATES` define, the issue goes away. The issue affects both MSVC 2015 and MSVC 2017. Even if the underlying cause is the compiler error (to be checked), the issue should at least be prevented by proper compiler version detection. This affects other boost libraries relying on base_from_member, like Boost.Iostreams." Bugs new To Be Determined utility Boost 1.64.0 Problem