Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83377 - sandbox/type_erasure/libs/type_erasure/doc
From: steven_at_[hidden]
Date: 2013-03-09 16:45:57


Author: steven_watanabe
Date: 2013-03-09 16:45:57 EST (Sat, 09 Mar 2013)
New Revision: 83377
URL: http://svn.boost.org/trac/boost/changeset/83377

Log:
Clarify constraints on template parameters.
Text files modified:
   sandbox/type_erasure/libs/type_erasure/doc/type_erasure.qbk | 12 +++++++++++-
   1 files changed, 11 insertions(+), 1 deletions(-)

Modified: sandbox/type_erasure/libs/type_erasure/doc/type_erasure.qbk
==============================================================================
--- sandbox/type_erasure/libs/type_erasure/doc/type_erasure.qbk (original)
+++ sandbox/type_erasure/libs/type_erasure/doc/type_erasure.qbk 2013-03-09 16:45:57 EST (Sat, 09 Mar 2013)
@@ -256,7 +256,10 @@
 A primitive concept must be a specialization of a
 class template, with a static member function
 called `apply`, which will be executed when the
-function is dispatched by __call.
+function is dispatched by __call. The template
+can only take template type parameters. non-type
+template parameters and template template parameters
+are not allowed.
 
 The template parameters of the concept
 may involve placeholders. The following are
@@ -331,6 +334,13 @@
     static void apply(const T&);
   };
 
+ // Wrong. Template template parameters are not allowed.
+ template<template<class> class T>
+ struct foo5
+ {
+ static void apply(T<int>&);
+ };
+
 [endsect]
 
 [section:predef Predefined Concepts]


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk