Commit 4c2b10d6 by Jonathan Wakely Committed by Jonathan Wakely

re PR libstdc++/67066 (libstdc++-v3/src/filesystem/dir.cc fails to compile with…

re PR libstdc++/67066 (libstdc++-v3/src/filesystem/dir.cc fails to compile with --enable-concept-checks)

	PR libstdc++/67066
	* doc/xml/manual/configure.xml (manual.intro.setup.configure): Add
	caveats for --enable-concept-checks. Improve link text.
	* doc/xml/manual/diagnostics.xml (std.diagnostics.concept_checking):
	Clarify caveats.
	* doc/html/*: Regenerate.
	* include/bits/stl_deque.h (deque): Only use concept checks in C++03.
	* include/bits/stl_stack.h (stack): Likewise.
	* include/bits/stl_vector.h (vector): Likewise.

From-SVN: r226984
parent f6e93c21
2015-08-18 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/67066
* doc/xml/manual/configure.xml (manual.intro.setup.configure): Add
caveats for --enable-concept-checks. Improve link text.
* doc/xml/manual/diagnostics.xml (std.diagnostics.concept_checking):
Clarify caveats.
* doc/html/*: Regenerate.
* include/bits/stl_deque.h (deque): Only use concept checks in C++03.
* include/bits/stl_stack.h (stack): Likewise.
* include/bits/stl_vector.h (vector): Likewise.
2015-08-14 Jonathan Wakely <jwakely@redhat.com> 2015-08-14 Jonathan Wakely <jwakely@redhat.com>
* include/experimental/any (any::operator=(const any&)): Move check * include/experimental/any (any::operator=(const any&)): Move check
......
...@@ -35,8 +35,9 @@ ...@@ -35,8 +35,9 @@
<code class="literal">-D_GLIBCXX_CONCEPT_CHECKS</code>. <code class="literal">-D_GLIBCXX_CONCEPT_CHECKS</code>.
</p><p> </p><p>
Please note that the checks are based on the requirements in the original Please note that the checks are based on the requirements in the original
C++ standard, some of which have changed in the new C++11 revision. C++ standard, many of which were relaxed in the C++11 standard and so valid
Additionally, some correct code might be rejected by the concept checks, C++11 code may be incorrectly rejected by the concept checks. Additionally,
some correct C++03 code might be rejected by the concept checks,
for example template argument types may need to be complete when used in for example template argument types may need to be complete when used in
a template definition, rather than at the point of instantiation. a template definition, rather than at the point of instantiation.
There are no plans to address these shortcomings. There are no plans to address these shortcomings.
......
...@@ -169,10 +169,12 @@ ...@@ -169,10 +169,12 @@
Mostly useful together with shared memory allocators, see PR Mostly useful together with shared memory allocators, see PR
libstdc++/16612 for details. libstdc++/16612 for details.
</p></dd><dt><span class="term"><code class="code">--enable-concept-checks</code></span></dt><dd><p>This turns on additional compile-time checks for instantiated </p></dd><dt><span class="term"><code class="code">--enable-concept-checks</code></span></dt><dd><p>This turns on additional compile-time checks for instantiated
library templates, in the form of specialized templates, library templates, in the form of specialized templates described in
<a class="link" href="concept_checking.html" title="Concept Checking">described here</a>. They the <a class="link" href="concept_checking.html" title="Concept Checking">Concept
Checking</a> section. They
can help users discover when they break the rules of the STL, before can help users discover when they break the rules of the STL, before
their programs run. their programs run. These checks are based on C++03 rules and some of
them are not compatible with correct C++11 code.
</p></dd><dt><span class="term"><code class="code">--enable-symvers[=style]</code></span></dt><dd><p>In 3.1 and later, tries to turn on symbol versioning in the </p></dd><dt><span class="term"><code class="code">--enable-symvers[=style]</code></span></dt><dd><p>In 3.1 and later, tries to turn on symbol versioning in the
shared library (if a shared library has been shared library (if a shared library has been
requested). Values for 'style' that are currently supported requested). Values for 'style' that are currently supported
......
...@@ -630,4 +630,4 @@ particular release. ...@@ -630,4 +630,4 @@ particular release.
</td></tr></tbody></table></div></div><br class="table-break" /></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="intro.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="intro.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="license.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part I.  </td></tr></tbody></table></div></div><br class="table-break" /></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="intro.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="intro.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="license.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part I. 
Introduction Introduction
 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> License</td></tr></table></div></body></html>  </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> License</td></tr></table></div></body></html>
\ No newline at end of file
...@@ -288,10 +288,12 @@ ...@@ -288,10 +288,12 @@
<varlistentry><term><code>--enable-concept-checks</code></term> <varlistentry><term><code>--enable-concept-checks</code></term>
<listitem><para>This turns on additional compile-time checks for instantiated <listitem><para>This turns on additional compile-time checks for instantiated
library templates, in the form of specialized templates, library templates, in the form of specialized templates described in
<link linkend="std.diagnostics.concept_checking">described here</link>. They the <link linkend="std.diagnostics.concept_checking">Concept
Checking</link> section. They
can help users discover when they break the rules of the STL, before can help users discover when they break the rules of the STL, before
their programs run. their programs run. These checks are based on C++03 rules and some of
them are not compatible with correct C++11 code.
</para> </para>
</listitem></varlistentry> </listitem></varlistentry>
......
...@@ -114,8 +114,9 @@ ...@@ -114,8 +114,9 @@
<para> <para>
Please note that the checks are based on the requirements in the original Please note that the checks are based on the requirements in the original
C++ standard, some of which have changed in the new C++11 revision. C++ standard, many of which were relaxed in the C++11 standard and so valid
Additionally, some correct code might be rejected by the concept checks, C++11 code may be incorrectly rejected by the concept checks. Additionally,
some correct C++03 code might be rejected by the concept checks,
for example template argument types may need to be complete when used in for example template argument types may need to be complete when used in
a template definition, rather than at the point of instantiation. a template definition, rather than at the point of instantiation.
There are no plans to address these shortcomings. There are no plans to address these shortcomings.
......
...@@ -829,7 +829,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -829,7 +829,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
{ {
// concept requirements // concept requirements
typedef typename _Alloc::value_type _Alloc_value_type; typedef typename _Alloc::value_type _Alloc_value_type;
#if __cplusplus < 201103L
__glibcxx_class_requires(_Tp, _SGIAssignableConcept) __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
#endif
__glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept) __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
typedef _Deque_base<_Tp, _Alloc> _Base; typedef _Deque_base<_Tp, _Alloc> _Base;
......
...@@ -100,8 +100,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -100,8 +100,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ {
// concept requirements // concept requirements
typedef typename _Sequence::value_type _Sequence_value_type; typedef typename _Sequence::value_type _Sequence_value_type;
#if __cplusplus < 201103L
__glibcxx_class_requires(_Tp, _SGIAssignableConcept) __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
__glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept) __glibcxx_class_requires(_Sequence, _BackInsertionSequenceConcept)
#endif
__glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept) __glibcxx_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept)
template<typename _Tp1, typename _Seq1> template<typename _Tp1, typename _Seq1>
......
...@@ -215,7 +215,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER ...@@ -215,7 +215,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
{ {
// Concept requirements. // Concept requirements.
typedef typename _Alloc::value_type _Alloc_value_type; typedef typename _Alloc::value_type _Alloc_value_type;
#if __cplusplus < 201103L
__glibcxx_class_requires(_Tp, _SGIAssignableConcept) __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
#endif
__glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept) __glibcxx_class_requires2(_Tp, _Alloc_value_type, _SameTypeConcept)
typedef _Vector_base<_Tp, _Alloc> _Base; typedef _Vector_base<_Tp, _Alloc> _Base;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment