Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12712: BOOST_AUTO_TEST_SUITE: Generate unique names by using __COUNTER__
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-01-31 16:00:38
#12712: BOOST_AUTO_TEST_SUITE: Generate unique names by using __COUNTER__
--------------------------------------+------------------------
Reporter: ki.stfu@⦠| Owner: renficiaud
Type: Patches | Status: new
Milestone: To Be Determined | Component: test
Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+------------------------
Comment (by renficiaud):
Thanks for the clarification. The problem with {{{__COUNTER__}}} is that
it is not a standard macro, I would rather not include that. Also since
those registrar are static, there is no clash in having the exact same
declarations (in terms of lines) in 2 different compilation units, if you
do not include everything in one place.
That is to me a really specific use case, and also has the following
drawbacks:
* each time a .cpp changes, a very big block is recompiled
* you do not benefit from potential accelerations of the build system (//
builds)
I am not sure the benefits of doing it the way you do outweigh the
problems (maybe you have numbers). I would rather suggest a nasty patch:
you can specify a line number with the {{{#line}}} preprocessor directive,
which may be used in conjunction with {{{__COUNTER__}}} in your case to
lower the risks for clashes.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12712#comment:8> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:21 UTC