Boost logo

Boost-Commit :

From: widman_at_[hidden]
Date: 2008-07-26 16:49:43

Author: james.widman
Date: 2008-07-26 16:49:42 EDT (Sat, 26 Jul 2008)
New Revision: 47833

Appended an emphatic deprecation of late_check to stmt.late.
Text files modified:
   sandbox/committee/concepts/wording/wording.tex | 57 ++++++++++++++++++++++++++++++++++++++++
   1 files changed, 57 insertions(+), 0 deletions(-)

Modified: sandbox/committee/concepts/wording/wording.tex
--- sandbox/committee/concepts/wording/wording.tex (original)
+++ sandbox/committee/concepts/wording/wording.tex 2008-07-26 16:49:42 EDT (Sat, 26 Jul 2008)
@@ -881,6 +881,63 @@
+this demonstrates the kind of template whose instantiations may
+ suffer from the dreaded ``dropped concept maps'' pitfall.
+within a late-checked block,
+ users should prefer to avoid using operations which,
+ if written outside of the late-checked block and in the nearest
+ enclosing unconstrained context,
+ would bind to a member of a concept map archetype.
+If said avoidance is not practical,
+ those operations should be clearly documented.
+For example, the author of \mbox{\tcode{add(T,T)}} should warn other users
+against satisfying \
+\mbox{\tcode{Semigroup<T>::operator+}} with anything other than the
+\mbox{\tcode{operator+}} that would normally be selected for a given type
+The use of \mbox{\tcode{late\_check}} is deprecated.
+a late-checked block should generally be used only when certain suitably
+constrained versions of templates are not yet available for use from
+within the body of a constrained template definition and the only viable
+alternative is the use of an unconstrained template.
+\mbox{\tcode{late\_check}} is regarded as an evolutionary tool only,
+and it was added to the language only after several debates and careful
+In the end,
+ it was decided that migrating a template library toward the use of
+ concepts would be prohibitively difficult in too many cases without
+ the ability to use an unconstrained template from within a constrained
+ template.
+So there are times when \mbox{\tcode{late\_check}} is a ``necessary
+But it is still
+``evil'' (because it can lead to dangers associated with ``dropped concept
+maps'' as in the \mbox{\tcode{Semigroup}} example above---not to mention
+the general loss of type-checking).
+Therefore users are encouraged to remove a use of
+\mbox{\tcode{late\_check}} when it is reasonable to do so.

Boost-Commit list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at