Subject: [Boost-bugs] [Boost C++ Libraries] #7539: including spirit multi_pass and info header files caused compile error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-21 03:56:28
#7539: including spirit multi_pass and info header files caused compile error
---------------------------------------+------------------------------------
Reporter: zhuo.qiang@⦠| Owner: djowel
Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
Version: Boost 1.52.0 | Severity: Showstopper
Keywords: spirit, c++11, multi_pass |
---------------------------------------+------------------------------------
It seems the 2 header files
* {{{boost/spirit/include/support_info.hpp}}}
* {{{boost/spirit/include/support_multi_pass.hpp}}}
are not getting along very well using clang and its libc++ under c++11
If the 2 files are included in the same complie unit (either directly or
indirectly) like following:
{{{
#!cpp
#include <boost/spirit/include/support_info.hpp>
#include <boost/spirit/include/support_multi_pass.hpp>
}}}
It will fail the clang with flag '-std=c++11', '-stdlib=libc++'
{{{
clang++ -o test.o -c -std=c++11 -stdlib=libc++
-I/Users/qiang/Projects/boost_1_51_0 test.cpp
In file included from test.cpp:1:
In file included from
/Users/qiang/Projects/boost_1_51_0/boost/spirit/include/support_info.hpp:15:
In file included from
/Users/qiang/Projects/boost_1_51_0/boost/spirit/home/support/info.hpp:19:
/usr/bin/../lib/c++/v1/list:212:9: error: field has incomplete type
'boost::spirit::info'
_Tp __value_;
^
/usr/bin/../lib/c++/v1/type_traits:1889:54: note: in instantiation of
template class 'std::__1::__list_node<boost::spirit::info, void *>'
requested here
decltype(_VSTD::move(_Tp(_VSTD::declval<_Args>()...)), true_type())
^
...
}}}
Attachment is the complete error message.
Reproduced in
* Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM
3.1svn)
* Target: x86_64-apple-darwin12.2.0
* With C++ 11 turn on: **"-std=c++11 -stdlib=libc++" , the 2 flags must be
turned on at the same time to reproduce this bug**
* Boost 1.51 and Boost Trunk rev.81030
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7539> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC