I am trying to get involved in the open source community and have offered to participate in a project, downloaded it and tried to go over the code and I have come across something I have never seen that is throwing a compile error (I may not have setup the project correctly yet with all the necessary lib references, so at the moment I am thinking the original developer is right and I am doing something wrong).
I can see the intent but still don't understand how it is a valid statement, and I am sure I am just missing something.
I know the using keyword is normally used in terms of namespaces but I have never seen an assignment operator included in the statement, the format of the declaration is as follows in the hh or declaration file of a class:
namespace A
{
class foo
{
.... some normal class constructors, functions etc.
}
// This next line I don't understand that doesn't compile.
using boo = foo* (*)();
// I think the intention is to create a keyword/macro as a type of
// polymorphism constructor, but:
// 1. foo is not a namespace but a class
// 2. I didn't think the using keyword in C++ would support such a statement?
}
// These two are equvalent
typedefint foo ;
using foo = int ;
// These two are equvalent
typedef foo* function_type() ;
using function_type = foo*() ;
// These four are equvalent
typedef function_type* boo ;
using boo = function_type* ;
typedef foo* (*boo)() ;
using boo = foo* (*)() ;