Opened 8 years ago
Last modified 6 years ago
#11181 reopened Library Submissions
Header conflict "using-declaration causes a multiple declaration of 'boost::iterators::use_default'"
Reported by: | Owned by: | Steven Watanabe | |
---|---|---|---|
Milestone: | Website 1.X | Component: | xpressive |
Version: | Boost.Build-M3 | Severity: | Not Applicable |
Keywords: | Cc: |
Description
I got "using-declaration causes a multiple declaration of 'boost::iterators::use_default'" error in my msvc. To reproduce bug you must create test.cpp with following text:
//test.cpp #include <boost/type_erasure/iterator.hpp> #include <boost/assign.hpp>
PS BUG appears only in boost 1.57.0, in older versions (for example 1.55.0) code compiles without errors.
Attachments (1)
Change History (13)
follow-up: 2 comment:1 by , 8 years ago
comment:2 by , 8 years ago
Replying to steven_watanabe:
It looks like it was caused by this:
May be, anyway i'll be waiting fix of this issue
follow-ups: 4 4 5 comment:3 by , 8 years ago
A quick workaround is to delete the declarations of boost::use_default in boost/type_erasure/iterator.hpp and add a #include <boost/iterator/iterator_adaptor.hpp>. I'll need to think a bit more about what the right fix should be. It's too late for 1.58 anyway.
comment:4 by , 8 years ago
Replying to steven_watanabe:
It's too late for 1.58 anyway.
I hope it will be fixed at least in 1.59
comment:4 by , 8 years ago
Replying to steven_watanabe:
It's too late for 1.58 anyway.
I hope it will be fixed at least in 1.59
comment:5 by , 8 years ago
Replying to steven_watanabe:
It's too late for 1.58 anyway.
Steven, this means that TypeErasure has been (and still is) broken on MSVC (and thus completely unusable for cross platform projects) for three consecutive Boost versions... Don't mean to sound harsh but that's quite off-putting (if not plain lame)...Are there some tests missing that should be added to catch these problems early?
comment:6 by , 7 years ago
In Boost 1.59.0, (what I assume to be) another manifestation of the same bug is driven by this source:
#include <boost/iterator/iterator_adaptor.hpp> #include <boost/type_erasure/any.hpp>
It's broken in either order, though the errors differ:
#include <boost/type_erasure/any.hpp> #include <boost/iterator/iterator_adaptor.hpp>
My platform is Apple LLVM version 7.0.0 (clang-700.1.76) from Xcode 7.1.1.
comment:7 by , 7 years ago
Applying the attached 11181.patch allowed me to work around this problem.
comment:9 by , 7 years ago
comment:10 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:11 by , 6 years ago
Component: | type_erasure → xpressive |
---|---|
Milestone: | To Be Determined → Website 1.X |
Resolution: | fixed |
Severity: | Problem → Not Applicable |
Status: | closed → reopened |
Type: | Bugs → Library Submissions |
Version: | Boost 1.57.0 → Boost.Build-M3 |
You are a really persuasive writer. I can see this in your writeup. You've a way of writing compelling info that sparks significantly interest. bgeebbbeckabdgba
It looks like it was caused by this: http://github.com/boostorg/iterator/commit/dc96d371faf87a88c04057861136c9dfa68103d7