我有以下代码:
template <typename Service = timer_impl>
class basic_timer
: public boost::asio::basic_io_object<Service> // a class derived from boost::asio::basic_io_object
{
public:
explicit basic_timer(boost::asio::io_service &io_service) //boost::asio::io_service::service
: boost::asio::basic_io_object<Service>(io_service)
{
}
sdgvdg;
void wait(std::size_t seconds)
{
return this->service.wait(this->implementation, seconds);
}
}
但是,VS2013不会将此sdgvdg
作为编译错误进行投诉,但实际上会将其解释为basic_timer<Service>::sdgvdg
。
只是想了解这背后发生了什么。为什么编译器不会将其作为语法错误抱怨。
timer_impl
只是我们的另一个课程。