Latest changes to scoped enum emulation break existing code

Hey all, The latest commit to the scoped enumerator emulation breaks existing code using the previous version of this functionality. Please see the Spirit regression tests for examples. Revision: 78407 Author: anthonyw Date: Thursday, May 10, 2012 12:06:15 PM Message: Combine scoped enum emulation from thread library into detail/scoped_enum_emulation.hpp ---- Modified : /trunk/boost/detail/scoped_enum_emulation.hpp Modified : /trunk/boost/thread/cv_status.hpp Deleted : /trunk/boost/thread/detail/scoped_enum.hpp Modified : /trunk/boost/thread/future.hpp Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.edu

Le 12/05/12 03:17, Hartmut Kaiser a écrit :
Hey all,
The latest commit to the scoped enumerator emulation breaks existing code using the previous version of this functionality. Please see the Spirit regression tests for examples.
Revision: 78407 Author: anthonyw Date: Thursday, May 10, 2012 12:06:15 PM Message: Combine scoped enum emulation from thread library into detail/scoped_enum_emulation.hpp ---- Modified : /trunk/boost/detail/scoped_enum_emulation.hpp Modified : /trunk/boost/thread/cv_status.hpp Deleted : /trunk/boost/thread/detail/scoped_enum.hpp Modified : /trunk/boost/thread/future.hpp
Hi, I have rolled back so that we can take the time to analyze what was wrong svn ci boost/detail -m "ScopedEnum: Rollback last change as there are regressions on Spirit" Sending boost/detail/scoped_enum_emulation.hpp Transmitting file data . Committed revision 78434. HTH, Vicente

Le 12/05/12 13:09, Vicente J. Botet Escriba a écrit :
Le 12/05/12 03:17, Hartmut Kaiser a écrit :
Hey all,
The latest commit to the scoped enumerator emulation breaks existing code using the previous version of this functionality. Please see the Spirit regression tests for examples.
Revision: 78407 Author: anthonyw Date: Thursday, May 10, 2012 12:06:15 PM Message: Combine scoped enum emulation from thread library into detail/scoped_enum_emulation.hpp ---- Modified : /trunk/boost/detail/scoped_enum_emulation.hpp Modified : /trunk/boost/thread/cv_status.hpp Deleted : /trunk/boost/thread/detail/scoped_enum.hpp Modified : /trunk/boost/thread/future.hpp
Hi,
I have rolled back so that we can take the time to analyze what was wrong
svn ci boost/detail -m "ScopedEnum: Rollback last change as there are regressions on Spirit" Sending boost/detail/scoped_enum_emulation.hpp Transmitting file data . Committed revision 78434.
HTH, Vicente Hi again,
Hartmut, unfortunatelly I'm unable to run the regression test on Spirit on my computer. Could you point where there are errors generated by the scoped enum change? Thanks, Vicente

Le 12/05/12 13:26, Vicente J. Botet Escriba a écrit :
Le 12/05/12 13:09, Vicente J. Botet Escriba a écrit :
Le 12/05/12 03:17, Hartmut Kaiser a écrit :
Hey all,
The latest commit to the scoped enumerator emulation breaks existing code using the previous version of this functionality. Please see the Spirit regression tests for examples.
Revision: 78407 Author: anthonyw Date: Thursday, May 10, 2012 12:06:15 PM Message: Combine scoped enum emulation from thread library into detail/scoped_enum_emulation.hpp ---- Modified : /trunk/boost/detail/scoped_enum_emulation.hpp Modified : /trunk/boost/thread/cv_status.hpp Deleted : /trunk/boost/thread/detail/scoped_enum.hpp Modified : /trunk/boost/thread/future.hpp
Hi,
I have rolled back so that we can take the time to analyze what was wrong
svn ci boost/detail -m "ScopedEnum: Rollback last change as there are regressions on Spirit" Sending boost/detail/scoped_enum_emulation.hpp Transmitting file data . Committed revision 78434.
HTH, Vicente Hi again,
Hartmut, unfortunatelly I'm unable to run the regression test on Spirit on my computer. Could you point where there are errors generated by the scoped enum change?
I'm getting the following error even after the rollback darwin.compile.c++ ../../../../bin.v2/libs/spirit/repository/test/karma_repo_subrule.test/darwin-4.7.0/debug/karma/subrule.o In file included from ../../../../boost/spirit/repository/include/karma_subrule.hpp:17:0, from karma/subrule.cpp:22: ../../../../boost/spirit/repository/home/karma/nonterminal/subrule.hpp: In member function ‘bool boost::spirit::repository::karma::subrule_group<Defs>::generate_subrule(const Def&, OutputIterator&, Context&, const Delimiter&, const Attribute&) const’: ../../../../boost/spirit/repository/home/karma/nonterminal/subrule.hpp:210:39: error: ‘domain’ is not a member of ‘boost::spirit::repository::karma’ ../../../../boost/spirit/repository/home/karma/nonterminal/subrule.hpp:210:39: note: suggested alternatives: In file included from ../../../../boost/spirit/home/karma/operator/sequence.hpp:14:0, from ../../../../boost/spirit/home/karma/operator.hpp:13, from ../../../../boost/spirit/include/karma_operator.hpp:16, from karma/subrule.cpp:10: ../../../../boost/spirit/home/karma/domain.hpp:26:12: note: ‘boost::spirit::karma::domain’ In file included from ../../../../boost/proto/core.hpp:13:0, from ../../../../boost/proto/proto.hpp:12, from ../../../../boost/spirit/home/support/meta_compiler.hpp:19, from ../../../../boost/spirit/home/karma/domain.hpp:15, from ../../../../boost/spirit/home/karma/operator/sequence.hpp:14, from ../../../../boost/spirit/home/karma/operator.hpp:13, from ../../../../boost/spirit/include/karma_operator.hpp:16, from karma/subrule.cpp:10: ../../../../boost/proto/proto_fwd.hpp:340:16: note: ‘boost::proto::domainns_::domain’ ../../../../boost/proto/proto_fwd.hpp:340:16: note: ‘boost::proto::domainns_::domain’ In file included from ../../../../boost/spirit/repository/include/karma_subrule.hpp:17:0, from karma/subrule.cpp:22: There were any change on Spirit? Vicente

Le 12/05/12 13:26, Vicente J. Botet Escriba a écrit :
Le 12/05/12 13:09, Vicente J. Botet Escriba a écrit :
Le 12/05/12 03:17, Hartmut Kaiser a écrit :
Hey all,
The latest commit to the scoped enumerator emulation breaks existing code using the previous version of this functionality. Please see the Spirit regression tests for examples.
Revision: 78407 Author: anthonyw Date: Thursday, May 10, 2012 12:06:15 PM Message: Combine scoped enum emulation from thread library into detail/scoped_enum_emulation.hpp ---- Modified : /trunk/boost/detail/scoped_enum_emulation.hpp Modified : /trunk/boost/thread/cv_status.hpp Deleted : /trunk/boost/thread/detail/scoped_enum.hpp Modified : /trunk/boost/thread/future.hpp
Hi,
I have rolled back so that we can take the time to analyze what was wrong
svn ci boost/detail -m "ScopedEnum: Rollback last change as there are regressions on Spirit" Sending boost/detail/scoped_enum_emulation.hpp Transmitting file data . Committed revision 78434.
HTH, Vicente Hi again,
Hartmut, unfortunatelly I'm unable to run the regression test on Spirit on my computer. Could you point where there are errors generated by the scoped enum change?
I'm getting the following error even after the rollback
darwin.compile.c++ ../../../../bin.v2/libs/spirit/repository/test/karma_repo_subrule.test/dar win-4.7.0/debug/karma/subrule.o In file included from ../../../../boost/spirit/repository/include/karma_subrule.hpp:17:0, from karma/subrule.cpp:22: ../../../../boost/spirit/repository/home/karma/nonterminal/subrule.hpp: In member function bool boost::spirit::repository::karma::subrule_group<Defs>::generate_subrule(co nst Def&, OutputIterator&, Context&, const Delimiter&, const Attribute&) const: ../../../../boost/spirit/repository/home/karma/nonterminal/subrule.hpp:210 :39: error: domain is not a member of boost::spirit::repository::karma ../../../../boost/spirit/repository/home/karma/nonterminal/subrule.hpp:210 :39: note: suggested alternatives: In file included from ../../../../boost/spirit/home/karma/operator/sequence.hpp:14:0, from ../../../../boost/spirit/home/karma/operator.hpp:13, from ../../../../boost/spirit/include/karma_operator.hpp:16, from karma/subrule.cpp:10: ../../../../boost/spirit/home/karma/domain.hpp:26:12: note: boost::spirit::karma::domain In file included from ../../../../boost/proto/core.hpp:13:0, from ../../../../boost/proto/proto.hpp:12, from ../../../../boost/spirit/home/support/meta_compiler.hpp:19, from ../../../../boost/spirit/home/karma/domain.hpp:15, from ../../../../boost/spirit/home/karma/operator/sequence.hpp:14, from ../../../../boost/spirit/home/karma/operator.hpp:13, from ../../../../boost/spirit/include/karma_operator.hpp:16, from karma/subrule.cpp:10: ../../../../boost/proto/proto_fwd.hpp:340:16: note: boost::proto::domainns_::domain ../../../../boost/proto/proto_fwd.hpp:340:16: note: boost::proto::domainns_::domain In file included from ../../../../boost/spirit/repository/include/karma_subrule.hpp:17:0, from karma/subrule.cpp:22:
There were any change on Spirit?
Never mind the subrule problems, they are unrelated. I asked on the Spirit list for more information and will report back as soon as I have it. Regards Hartmut --------------- http://boost-spirit.com http://stellar.cct.lsu.edu

Hi Vicente, On Saturday, 12. May 2012 13:09:56 Vicente J. Botet Escriba wrote:
Le 12/05/12 03:17, Hartmut Kaiser a écrit :
Hey all,
The latest commit to the scoped enumerator emulation breaks existing code using the previous version of this functionality. Please see the Spirit regression tests for examples.
Hi,
I have rolled back so that we can take the time to analyze what was wrong
I think I ran into this one yesterday. There is a name clash between an internal scoped enum helper function "native()" and a spririt enum containing an enum value of "native". Changing the scoped enum implementation to use "native_()" fixed the problem for me. Patch attached. Hope this helps. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu !

Le 12/05/12 17:09, Jürgen Hunold a écrit :
Hi Vicente,
On Saturday, 12. May 2012 13:09:56 Vicente J. Botet Escriba wrote:
Le 12/05/12 03:17, Hartmut Kaiser a écrit :
Hey all,
The latest commit to the scoped enumerator emulation breaks existing code using the previous version of this functionality. Please see the Spirit regression tests for examples.
Hi,
I have rolled back so that we can take the time to analyze what was wrong I think I ran into this one yesterday. There is a name clash between an internal scoped enum helper function "native()" and a spririt enum containing an enum value of "native". Changing the scoped enum implementation to use "native_()" fixed the problem for me. Patch attached.
Oh, I didn't though about this possible issue. Thanks for the analysis. Do you think that as these functions are not part of the interface a longer name could be enough to avoid future clashes? Best, Vicente

Le 12/05/12 17:58, Vicente J. Botet Escriba a écrit :
Le 12/05/12 17:09, Jürgen Hunold a écrit :
Hi Vicente,
On Saturday, 12. May 2012 13:09:56 Vicente J. Botet Escriba wrote:
Le 12/05/12 03:17, Hartmut Kaiser a écrit :
Hey all,
The latest commit to the scoped enumerator emulation breaks existing code using the previous version of this functionality. Please see the Spirit regression tests for examples.
Hi,
I have rolled back so that we can take the time to analyze what was wrong I think I ran into this one yesterday. There is a name clash between an internal scoped enum helper function "native()" and a spririt enum containing an enum value of "native". Changing the scoped enum implementation to use "native_()" fixed the problem for me. Patch attached.
Oh, I didn't though about this possible issue. Thanks for the analysis.
Do you think that as these functions are not part of the interface a longer name could be enough to avoid future clashes?
I have changed the names of the native and underlying functions to get_native_value_ and get_underlying_value_. I hope that these names will not be used as names for literals of an enum type. svn ci boost/detail -m "ScopedEnum: Fix issue with native() function clash" Sending boost/detail/scoped_enum_emulation.hpp Transmitting file data . Committed revision 78437. Best, Vicente

On Sat, May 12, 2012 at 10:30 AM, Vicente J. Botet Escriba < vicente.botet@wanadoo.fr> wrote:
Le 12/05/12 17:58, Vicente J. Botet Escriba a écrit :
Le 12/05/12 17:09, Jürgen Hunold a écrit :
Hi Vicente,
On Saturday, 12. May 2012 13:09:56 Vicente J. Botet Escriba wrote:
Le 12/05/12 03:17, Hartmut Kaiser a écrit :
Hey all,
The latest commit to the scoped enumerator emulation breaks existing code using the previous version of this functionality. Please see the Spirit regression tests for examples.
Hi,
I have rolled back so that we can take the time to analyze what was wrong
I think I ran into this one yesterday. There is a name clash between an internal scoped enum helper function "native()" and a spririt enum containing an enum value of "native". Changing the scoped enum implementation to use "native_()" fixed the problem for me. Patch attached.
Oh, I didn't though about this possible issue. Thanks for the analysis.
Do you think that as these functions are not part of the interface a longer name could be enough to avoid future clashes?
I have changed the names of the native and underlying functions to get_native_value_ and get_underlying_value_. I hope that these names will not be used as names for literals of an enum type.
svn ci boost/detail -m "ScopedEnum: Fix issue with native() function clash" Sending boost/detail/scoped_enum_**emulation.hpp Transmitting file data . Committed revision 78437.
If these functions are indeed not exposed to the interface (are they brought into user code via a macro or something?), then why not something really specialized like _boost_scoped_enum_native and _boost_scoped_enum_underlying? - Jeff

Le 13/05/12 00:21, Jeffrey Lee Hellrung, Jr. a écrit :
On Sat, May 12, 2012 at 10:30 AM, Vicente J. Botet Escriba< vicente.botet@wanadoo.fr> wrote:
I have changed the names of the native and underlying functions to get_native_value_ and get_underlying_value_. I hope that these names will not be used as names for literals of an enum type.
svn ci boost/detail -m "ScopedEnum: Fix issue with native() function clash" Sending boost/detail/scoped_enum_**emulation.hpp Transmitting file data . Committed revision 78437.
If these functions are indeed not exposed to the interface (are they brought into user code via a macro or something?), then why not something really specialized like _boost_scoped_enum_native and _boost_scoped_enum_underlying?
Yes, why not. I'll change them if these are considered safer. Best, Vicente
participants (4)
-
Hartmut Kaiser
-
Jeffrey Lee Hellrung, Jr.
-
Jürgen Hunold
-
Vicente J. Botet Escriba