- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I would like to report an error during the compilation of a code that uses the beast component of Boost (v1.71.0).
Basically, I obtain the following error when I call the function boost::beast::http::read :
H:/3rdParty_lib/Boost/boost_1_71_0/boost/beast/http/message.hpp(265): error: static assertion failed with "Fields type requirements not met" static_assert(is_fields<Fields>::value, ^ detected during: instantiation of class "boost::beast::http::header<0, Fields> [with Fields=boost::beast::http::fields]" at line 495 instantiation of class "boost::beast::http::message<isRequest, Body, Fields> [with isRequest=0, Body=boost::beast::http::string_body, Fields=boost::beast::http::fields]" at line 22 of "H:/TestIntelBoost/main.cpp" H:/3rdParty_lib/Boost/boost_1_71_0/boost/beast/http/message.hpp(61): error: static assertion failed with "Fields type requirements not met" static_assert(is_fields<Fields>::value, ^ detected during: instantiation of class "boost::beast::http::header<1, Fields> [with Fields=boost::beast::http::detail::fields_model]" at line 487 of "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\type_traits" instantiation of class "std::is_constructible<_Ty, _Args...> [with _Ty=boost::beast::http::basic_string_body<char, std::char_traits<char>, std::allocator<char>>::reader, _Args=<boost::beast::http::header<1, boost::beast::http::detail::fields_model> &, std::basic_string<char, std::char_traits<char>, std::allocator<char>> &>]" at line 188 of "H:/3rdParty_lib/Boost/boost_1_71_0/boost/beast/http/type_traits.hpp" instantiation of class "boost::beast::http::is_body_reader<T, boost::beast::detail::void_t<decltype((<expression>))>> [with T=boost::beast::http::string_body]" at line 489 of "H:/3rdParty_lib/Boost/boost_1_71_0/boost/beast/http/impl/read.hpp" instantiation of "size_t={unsigned __int64} boost::beast::http::read(SyncReadStream &, DynamicBuffer &, boost::beast::http::message<isRequest, Body, boost::beast::http::basic_fields<Allocator>> &) [with SyncReadStream=boost::beast::tcp_stream, DynamicBuffer=boost::beast::flat_buffer, isRequest=0, Body=boost::beast::http::string_body, Allocator=std::allocator<char>]" at line 22 of "H:/TestIntelBoost/main.cpp" H:/3rdParty_lib/Boost/boost_1_71_0/boost/beast/http/message.hpp(265): error: static assertion failed with "Fields type requirements not met" static_assert(is_fields<Fields>::value, ^ detected during: instantiation of class "boost::beast::http::header<0, Fields> [with Fields=boost::beast::http::detail::fields_model]" at line 487 of "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\type_traits" instantiation of class "std::is_constructible<_Ty, _Args...> [with _Ty=boost::beast::http::basic_string_body<char, std::char_traits<char>, std::allocator<char>>::reader, _Args=<boost::beast::http::header<0, boost::beast::http::detail::fields_model> &, std::basic_string<char, std::char_traits<char>, std::allocator<char>> &>]" at line 191 of "H:/3rdParty_lib/Boost/boost_1_71_0/boost/beast/http/type_traits.hpp" instantiation of class "boost::beast::http::is_body_reader<T, boost::beast::detail::void_t<decltype((<expression>))>> [with T=boost::beast::http::string_body]" at line 489 of "H:/3rdParty_lib/Boost/boost_1_71_0/boost/beast/http/impl/read.hpp" instantiation of "size_t={unsigned __int64} boost::beast::http::read(SyncReadStream &, DynamicBuffer &, boost::beast::http::message<isRequest, Body, boost::beast::http::basic_fields<Allocator>> &) [with SyncReadStream=boost::beast::tcp_stream, DynamicBuffer=boost::beast::flat_buffer, isRequest=0, Body=boost::beast::http::string_body, Allocator=std::allocator<char>]" at line 22 of "H:/TestIntelBoost/main.cpp"
Please, find in attach a minimal example reproducing the issue which does not happen with Microsoft compiler and note that the same issue is described at the following link without a solution:
https://github.com/boostorg/beast/issues/1259
Here is the version of icl I am using:
$ icl Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.0.4.245 Build 20190417 Copyright (C) 1985-2019 Intel Corporation. All rights reserved. icl: command line error: no files specified; for help type "icl /help"
Can you please check?
Thanks and best regards.
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you create a preprocessed file from main.cpp and provide it to us? icl /E main.cpp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Issue has been fixed in ICL19.1
C:\Temp\vah\main_prep>icl main_prep.cpp /c /W0
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.0.166 Build 20191121
Copyright (C) 1985-2019 Intel Corporation. All rights reserved.
C:\Temp\vah\main_prep>dir main_prep.obj
01/13/2020 08:37 AM 106,911 main_prep.obj
1 File(s) 106,911 bytes
0 Dir(s) 8,831,021,056 bytes free
C:\Temp\vah\main_prep>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
can you suggest me a workaround in order to compile the code with v19.0?
Many thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I'm not aware that we have a workaround in v19.0

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page