This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: what may cause compile error (expected nested-name-specifier before 'Policy-T')?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]