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: fsmoke@… 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)

11181.patch (1.3 KB ) - added by nat@… 7 years ago.
patch implementing Steven's suggested workaround

Download all attachments as: .zip

Change History (13)

comment:1 by Steven Watanabe, 8 years ago

in reply to:  1 comment:2 by anonymous, 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

comment:3 by Steven Watanabe, 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.

in reply to:  3 comment:4 by anonymous, 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

in reply to:  3 comment:4 by fsmoke, 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

in reply to:  3 comment:5 by Domagoj Šarić, 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 nat@…, 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.

by nat@…, 7 years ago

Attachment: 11181.patch added

patch implementing Steven's suggested workaround

comment:7 by nat@…, 7 years ago

Applying the attached 11181.patch allowed me to work around this problem.

comment:8 by fsmoke@…, 7 years ago

when it be in release?

comment:9 by Michel Morin, 7 years ago

Hey, did you try Boost 1.60 beta RC? I couldn't get errors using that version on clang trunk. You can get the beta RC here; see this ML post. (Note that Boost 1.60 beta has not yet been released.)

comment:10 by Steven Watanabe, 7 years ago

Resolution: fixed
Status: newclosed

comment:11 by Smithe353, 6 years ago

Component: type_erasurexpressive
Milestone: To Be DeterminedWebsite 1.X
Resolution: fixed
Severity: ProblemNot Applicable
Status: closedreopened
Type: BugsLibrary Submissions
Version: Boost 1.57.0Boost.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

Note: See TracTickets for help on using tickets.