Opened 12 years ago

Last modified 8 years ago

#5109 new Bugs

assignment operator could not be generated VC 2008

Reported by: borisarb@… Owned by: nasonov
Milestone: To Be Determined Component: scope_exit
Version: Boost 1.45.0 Severity: Problem
Keywords: warning VC2008 Cc:

Description

I get the folowing warnings when using BOOST_SCOPE_EXIT from boost/scope_exit.hpp in VC 2008 SP1

1>D:\Programming\boost_1_45_0\boost/scope_exit.hpp(84) : warning C4512: 'boost::scope_exit::aux::member<T,Tag>' : assignment operator could not be generated
1>        with
1>        [
1>            T=test::boost_se_params_t_0::boost_se_param_t_0_0,
1>            Tag=boost_se_tag_0_0
1>        ]
1>        .\test.cpp(7) : see reference to class template instantiation 'boost::scope_exit::aux::member<T,Tag>' being compiled
1>        with
1>        [
1>            T=test::boost_se_params_t_0::boost_se_param_t_0_0,
1>            Tag=boost_se_tag_0_0
1>        ]
1>.\test.cpp(7) : warning C4512: 'test::boost_se_params_t_0' : assignment operator could not be generated
1>        .\test.cpp(7) : see declaration of 'test::boost_se_params_t_0'

This happens under boost 1.45.

Attachments (2)

5109.txt (1.1 KB ) - added by nasonov 11 years ago.
Please test this patch,
scope_exit.hpp.patch (517 bytes ) - added by Valentin Shtronda <valiko.ua@…> 10 years ago.
This is how I removed warnings that I see.

Download all attachments as: .zip

Change History (6)

comment:1 by anonymous, 11 years ago

it happens under boost 1.46.1 and visual studio 2010 too

in reply to:  1 comment:2 by nasonov, 11 years ago

Replying to anonymous:

it happens under boost 1.46.1 and visual studio 2010 too

I don't have Windows environment to test. I assume that boost_se_tag_0_0 is ref_tag? If so, can add undefined operator= to member<T,ref_tag> and to struct BOOST_SCOPE_EXIT_AUX_PARAMS_T(id)?

by nasonov, 11 years ago

Attachment: 5109.txt added

Please test this patch,

comment:3 by Valentin Shtronda <valiko.ua@…>, 10 years ago

2 nasonov: Same with VC2012 and boost 1.53. Can you please update the patch for testing? Thanks.

by Valentin Shtronda <valiko.ua@…>, 10 years ago

Attachment: scope_exit.hpp.patch added

This is how I removed warnings that I see.

comment:4 by anonymous, 8 years ago

Same thing in boost 1.55. Are you going to fix it or not?

Note: See TracTickets for help on using tickets.