[Hana] "basic_tuple.hpp" bug when building with VS2017

Hello,
Just installed Boost and Visual Studio 2017 a few days ago.
Visual Studio 2017 is known to be unable to compile Hana (and other libraries such as Range-v3). I will be working with the Microsoft folks to make it work as they explicitly reached out to me with that intent. Cheers, Louis

Louis Dionne wrote:
Visual Studio 2017 is known to be unable to compile Hana (and other libraries such as Range-v3).
"Visual Studio 2017" refers to four different compilers now, and the latest of these can compile many things the earliest could not, so if you haven't checked how 2017 fares in a while, a second look may be worth it.

I should clarify that I am using VC++ v141 toolset. I just installed VS2017 last week so I think this is the latest release. Adding /permissive- or not does not fix the issue. I tried all the following flags as well: /std:c++14, /std:c++17 and /std:c++latest. FYI, I submitted the issue on Microsoft's end as well. Link here: https://developercommunity.visualstudio.com/content/problem/255672/boosthana... I am almost certain it is a MSVC++ compiler issue since I switched to the Clang compiler and it successfully built. -Daniel Chen -----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Peter Dimov via Boost Sent: Tuesday, May 22, 2018 12:36 PM To: boost@lists.boost.org Cc: Peter Dimov <lists@pdimov.com> Subject: Re: [boost] [Hana] "basic_tuple.hpp" bug when building with VS2017 CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Louis Dionne wrote:
Visual Studio 2017 is known to be unable to compile Hana (and other libraries such as Range-v3).
"Visual Studio 2017" refers to four different compilers now, and the latest of these can compile many things the earliest could not, so if you haven't checked how 2017 fares in a while, a second look may be worth it. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

#include <boost/hana/string.hpp> #include <boost/hana/basic_tuple.hpp> int main() { } -----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Peter Dimov via Boost Sent: Tuesday, May 22, 2018 12:56 PM To: boost@lists.boost.org Cc: Peter Dimov <lists@pdimov.com> Subject: Re: [boost] [Hana] "basic_tuple.hpp" bug when building with VS2017 CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Daniel Chen wrote:
I should clarify that I am using VC++ v141 toolset. I just installed VS2017 last week so I think this is the latest release.
Could you please give a minimal source file that triggers the error? _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

I have Visual Studio 2017 15.7.2, _MSC_VER=1914 Visual Studio 2017 v141 toolset And I am getting this build error. -Daniel -----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Peter Dimov via Boost Sent: Tuesday, May 22, 2018 1:30 PM To: boost@lists.boost.org Cc: Peter Dimov <lists@pdimov.com> Subject: Re: [boost] [Hana] "basic_tuple.hpp" bug when building with VS2017 CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Daniel Chen wrote:
#include <boost/hana/string.hpp> #include <boost/hana/basic_tuple.hpp>
int main() { }
Compiles for me. Visual Studio 2017 15.7.2. _MSC_VER=1914. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

I can't reproduce your error, sorry. There's something different between our configurations and I don't know what that is. C:\Projects\testbed2017>type test_hana.cpp #include <boost/hana/string.hpp> #include <boost/hana/basic_tuple.hpp> int main() { } C:\Projects\testbed2017>cl /EHsc /I \boost-git\master test_hana.cpp Microsoft (R) C/C++ Optimizing Compiler Version 19.14.26429.4 for x86 Copyright (C) Microsoft Corporation. All rights reserved. test_hana.cpp Warning: the native Microsoft compiler is not supported due to lack of proper C+ +14 support. Warning: Your compiler doesn't provide C++14 or higher capabilities. Try adding the compiler flag '-std=c++14' or '-std=c++1y'. Microsoft (R) Incremental Linker Version 14.14.26429.4 Copyright (C) Microsoft Corporation. All rights reserved. /out:test_hana.exe test_hana.obj C:\Projects\testbed2017>cl /EHsc /I c:\tmp\boost-1.67.0 test_hana.cpp Microsoft (R) C/C++ Optimizing Compiler Version 19.14.26429.4 for x86 Copyright (C) Microsoft Corporation. All rights reserved. test_hana.cpp Warning: the native Microsoft compiler is not supported due to lack of proper C+ +14 support. Warning: Your compiler doesn't provide C++14 or higher capabilities. Try adding the compiler flag '-std=c++14' or '-std=c++1y'. Microsoft (R) Incremental Linker Version 14.14.26429.4 Copyright (C) Microsoft Corporation. All rights reserved. /out:test_hana.exe test_hana.obj -----Original Message----- From: Daniel Chen via Boost Sent: Thursday, May 24, 2018 22:03 To: boost@lists.boost.org Cc: Daniel Chen Subject: Re: [boost] [Hana] "basic_tuple.hpp" bug when building with VS2017 I have Visual Studio 2017 15.7.2, _MSC_VER=1914 Visual Studio 2017 v141 toolset And I am getting this build error. -Daniel -----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Peter Dimov via Boost Sent: Tuesday, May 22, 2018 1:30 PM To: boost@lists.boost.org Cc: Peter Dimov <lists@pdimov.com> Subject: Re: [boost] [Hana] "basic_tuple.hpp" bug when building with VS2017 CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Daniel Chen wrote:
#include <boost/hana/string.hpp> #include <boost/hana/basic_tuple.hpp>
int main() { }
Compiles for me. Visual Studio 2017 15.7.2. _MSC_VER=1914. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

I'm actively working with the MSVC folks at fixing their issues here: https://github.com/boostorg/hana/issues?q=label%3AMSVC+ If you see additional problems that are not being addressed up there, please submit an issue on GitHub -- this is the preferred way to track issues with Hana. Louis

Louis Dionne wrote:
Visual Studio 2017 is known to be unable to compile Hana (and other libraries such as Range-v3).
"Visual Studio 2017" refers to four different compilers now, and the latest of these can compile many things the earliest could not, so if you haven't checked how 2017 fares in a while, a second look may be worth it.
...failed updating 510 targets... ...skipped 1528 targets... ...updated 6019 targets... Many of the failures are because C:\boost-git\develop\libs\hana\test\_include\laws/base.hpp(105): error C2580: 'boost::hana::test::trap_construct::trap_construct(boost::hana::test::trap_construct &)': multiple versions of a defaulted special member functions are not allowed With that fixed, the result is ...failed updating 151 targets... ...skipped 451 targets... ...updated 1810 targets... So it's not like everything works (the compiler crashes quite a few times), but on the other hand, things look far from totally unusable.
participants (4)
-
Daniel Chen
-
Louis Dionne
-
Louis Dionne
-
Peter Dimov