[Boost-users] [fusion] vector slicing (sort of)

7 views
Skip to first unread message

Jean-Louis Leroy

unread,
Oct 25, 2009, 12:00:24 PM10/25/09
to boost...@lists.boost.org
I am a bit surprised that this compiles:

vector<char, int> v2;
vector<char> v1(v2);
v1 = v2;

J-L

_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

joel

unread,
Oct 25, 2009, 12:21:04 PM10/25/09
to boost...@lists.boost.org
Jean-Louis Leroy wrote:
> I am a bit surprised that this compiles:
>
> vector<char, int> v2;
> vector<char> v1(v2);
> v1 = v2;
Well, there is no static check on the size of both fusion::vector.
v2 = v1 should not compile tough

--
___________________________________________
Joel Falcou - Assistant Professor
PARALL Team - LRI - Universite Paris Sud XI
Tel : (+33)1 69 15 66 35

Jean-Louis Leroy

unread,
Oct 25, 2009, 12:31:40 PM10/25/09
to boost...@lists.boost.org
joel wrote:
> Jean-Louis Leroy wrote:
>> I am a bit surprised that this compiles:
>>
>> vector<char, int> v2;
>> vector<char> v1(v2);
>> v1 = v2;
> Well, there is no static check on the size of both fusion::vector.
> v2 = v1 should not compile tough

Info: I use msvc9 express.

J-L

Joel de Guzman

unread,
Oct 25, 2009, 8:46:01 PM10/25/09
to boost...@lists.boost.org
Jean-Louis Leroy wrote:
> joel wrote:
>> Jean-Louis Leroy wrote:
>>> I am a bit surprised that this compiles:
>>>
>>> vector<char, int> v2;
>>> vector<char> v1(v2);
>>> v1 = v2;
>> Well, there is no static check on the size of both fusion::vector.
>> v2 = v1 should not compile tough
>
> Info: I use msvc9 express.

Clearly a bug. Please file a bug report.

Regards,
--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net
http://www.facebook.com/djowel

Meet me at BoostCon
http://www.boostcon.com/home
http://www.facebook.com/boostcon

Reply all
Reply to author
Forward
0 new messages