[ConceptGCC] |
ConceptGCC :Associated values problem |
From: Walter E Brown (wb_at_[hidden])
Date: 2007-04-20 16:21:01
The code below, inserted into and toward the bottom of the <concepts>
header, causes conceptgcc-4.3.0-alpha-6 to issue the following diagnostics:
concepts:312: error: type 'G' is not derived from type
std::UniformRandomNumberGenerator<G>'
concepts:313: error: type 'G' is not derived from type
'std::UniformRandomNumberGenerator<G>'
concepts:314: error: incomplete type 'G' used in nested name specifier
concepts:314: error: incomplete type 'G' used in nested name specifier
concepts:314: error: template argument 1 is invalid
It seems as if the compiler does not yet understand associated values,
right?
-- WEB
// 26.4.1.2 (table 97)
auto concept UniformRandomNumberGenerator< typename G >
: Callable0<G>
{
requires UnsignedIntegral<result_type>;
static result_type const G::min; // line 312
static result_type const G::max; // line 313
requires True< (G::min < G::max) >; // line 314
axiom InRange( G g )
{
G::min <= g();
g() <= G::max;
}
};