This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: testsuite allocators patch


On 24/07/2014 10:55, Jonathan Wakely wrote:
On 23/07/14 22:33 +0200, François Dumont wrote:
I have a small question regarding some code next to the one I am modifying in this patch. I can see lines like:

     propagating_allocator() noexcept = default;

When using a default implementation shouldn't we let the compiler decide if it should be noexcept or not depending on the member fields or base class default constructors ?

Stating it explicitly means you get an error if the default
implementation is not noexcept. That can be useful, to ensure you
don't silently start getting a throwing constructor by mistake because
of a change to a base class.

I'm not sure if I added the noexcept above, but if I did that might
have been what I was intending it to do. I don't remember.

I'll review the rest of the patch ASAP. Did you test it with no other
changes in your tree, and run the entire testsuite?

Ok, thanks for the explanation, it is clear now.

Yes I have tested with no other changes in my tree and got only those pretty printers errors which are unrelated I think:

Python Exception <class 'TypeError'> iter() returned non-iterator of type '_contained':
$2 = std::experimental::optional<int> [no contained value]
skipping: Python Exception <class 'TypeError'> iter() returned non-iterator of type '_contained':
got: $2 = std::experimental::optional<int> [no contained value]
PASS: libstdc++-prettyprinters/libfundts.cc print o
Python Exception <class 'TypeError'> iter() returned non-iterator of type '_contained':
$3 = std::experimental::optional<bool>
skipping: Python Exception <class 'TypeError'> iter() returned non-iterator of type '_contained':
got: $3 = std::experimental::optional<bool>
FAIL: libstdc++-prettyprinters/libfundts.cc print ob
Python Exception <class 'TypeError'> iter() returned non-iterator of type '_contained':
$4 = std::experimental::optional<int>
skipping: Python Exception <class 'TypeError'> iter() returned non-iterator of type '_contained':
got: $4 = std::experimental::optional<int>
FAIL: libstdc++-prettyprinters/libfundts.cc print oi

François


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]