This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: what may cause compile error (expected nested-name-specifier before 'Policy-T')?
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: eric <cneric12lin0 at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 11 Jul 2011 20:38:07 +0100
- Subject: Re: what may cause compile error (expected nested-name-specifier before 'Policy-T')?
- References: <64a52045-54be-4994-a805-72aab256b2b2@j14g2000prn.googlegroups.com>
On 11 July 2011 19:59, eric wrote:
> // Example 5-10 constrained_value.hpp
> #ifndef CINSTRAINED_VALUE_HPP
^ ???
> #define CONSTRAINED_VALUE_HPP
>
> #include <cstdlib>
> #include <iostream>
>
> using namespace std;
>
> template<class Policy_T>
> struct ConstrainedValue
> {
> ?public:
> ?// public typedefs
> ?typedef typename Policy_T policy_type;
^ typename not allowed here