Disable some concept checks in C++11

François Dumont frs.dumont@gmail.com
Mon Feb 27 20:11:00 GMT 2017


Hi


     I had some problems when testing pretty printers while having 
activated concept checks. I noticed that std::deque had already the 
_SGIAssignableConcept check disable when using C++11 so I propose to 
generalize to all usages of this concept check.

     Additionally it avoids the definition of a typedef, usually 
_Alloc_value_type, only used when concept check is activated.

     Note that I plan to also commit several cleanup of empty chars with 
this patch, transformation of 8 spaces into tabs or removal of spaces at 
end of line. I attached a 'git diff -w' patch file, let me know if you 
want to see the complete version.

Tested under Linux x86_64.

Ok to commit ? Now ?

     * include/bits/stl_deque.h (deque): Access allocator value_type only if
     concept checks are enabled.
     * include/bits/stl_stack.h (stack): Likewise.
     * include/bits/stl_vector.h (vector): Likewise.
     * include/bits/stl_list.h (list): Likewise and check
     _SGIAssignableConcept only in C++03.
     * include/bits/stl_map.h (map): Likewise.
     * include/bits/stl_set.h (set): Likewise.
     * include/bits/stl_multimap.h (multimap): Likewise.
     * include/bits/stl_multiset.h (multiset): Likewise.
     * include/bits/stl_queue.h (queue, priority_queue): Likewise.
     * include/ext/slist (slist): Likewise.

François

-------------- next part --------------
A non-text attachment was scrubbed...
Name: concept_checks.patch
Type: text/x-patch
Size: 8469 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20170227/1c98aea3/attachment.bin>


More information about the Libstdc++ mailing list