Re: N2691 Inconsistencies in construct_element requirements
Bo Persson ha scritto:
In section 20.7.9 [construct.element] the Effects clause contains
(options 2 and 3):
- if constructible_with_allocator_prefix<T, A::inner_allocator_type,
Args...> is derived
from true_type,
alloc.construct(alloc.address(r), allocator_arg_t,
alloc.inner_allocator(), args...)
- if constructible_with_allocator_suffix<T, A::inner_allocator_type,
Args...> is derived
from true_type,
alloc.construct(alloc.address(r), args..., alloc.inner_allocator())
However, these constructible_with_allocator_prefix and
constructible_with_allocator_suffix are concept maps, and not traits
derivable from true_type. This makes the section unimplementable at
present.
Concepts are not yet part of the draft, so how could there be concept
maps? In the latest draft, constructible_with_allocator_(prefix|suffix)
are still traits, as it's clearly stated in 20.7/1:
// 20.7.2, allocator-related traits
template <class T, class Alloc> struct uses_allocator;
template <class Alloc> struct is_scoped_allocator;
template <class T> struct constructible_with_allocator_suffix;
template <class T> struct constructible_with_allocator_prefix;
But, yes, they will soon be replaced by concept maps as part of the
ongoing conceptualization effort of the standard library. Any
inconsistency will hopefully be resolved by that effort. We are aware
that the recent draft voted in Sophia is "work in progress" with respect
to concepts in the library, but it was important to have all library
components in the draft to reflect the current state of evolution before
starting conceptualizing everything.
For this specific issue, see also paper N2654
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2654.pdf
Ganesh
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]