G ++ error: Expected Nested-name-specifier before 'xxx'

Source: Internet
Author: User
 1 template <typename addrT=int,typename valuT=int,typename stream_addrT=bm_addr,typename stream_sizeT=int64>  2 class  stream_chip : public chip<addrT,valuT>{  3 public:  4     typedef  typename stream_addrT stream_addr_type;  5     typedef  typename stream_sizeT stream_size_type;  6   7     stream_chip (bus_type * const owner, addr_type addr):chip<addrT,valuT>(owner,addr)  8     {}  9 public: 10     virtual stream_size_type write_mem(stream_addr_type dest_addr, void* pValue ,stream_size_type size)=0;  //write board memory 11     virtual stream_size_type read_mem(void* pValue,stream_size_type size ,stream_addr_type src_addr)=0;        //read bpard memory     12  13 };

 


All the codes are compiled in.

Delete the preceding public typename. The error is not reported. Alas, there are many problems with the ISO standard. The expansion implementation of various platforms is also messy.

References:
Http://bbs.csdn.net/topics/370075224
Http://stackoverflow.com/questions/5249835/expected-nested-name-specifier-before-const-error-with-typename-const-in-g



G ++ error: Expected Nested-name-specifier before 'xxx'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.