Opened 3 years ago

Last modified 3 years ago

#11787 new Bugs

fusion for_each turns array reference const on msvc

Reported by: imer@… Owned by: Joel de Guzman
Milestone: To Be Determined Component: fusion
Version: Boost Development Trunk Severity: Problem
Keywords: fusion array const Cc:

Description

On MSVC 2013 (I have not tested any other versions) arrays are always const references, instead of non-const ones. Thus code that needs to modify the array and doesn't have a const overload fails to compile.

I don't know if the issue concerns other parts than for_each

A simple test case is attached

Expected output (as seen when using gcc/clang):

Int
Char [10]

Output using msvc 2013:

Int
Const Char[10]

I have tested it against boost 1.59 and a fresh git clone.

Attachments (1)

test.cpp (789 bytes) - added by imer <imer@…> 3 years ago.
Simple test case

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by imer <imer@…>

Attachment: test.cpp added

Simple test case

comment:1 Changed 3 years ago by Kohei Takahashi <flast@…>

VC14 works as expected, but VC11 don't. In addition Boost.TypeOf? works all of VC11, VC12 and VC14.

Note: See TracTickets for help on using tickets.