Interpreting complex C++ Definition [closed]What are the differences between a pointer variable and a reference variable in C++?What are POD types in C++?How can I profile C++ code running on Linux?The Definitive C++ Book Guide and ListWhat is the effect of extern “C” in C++?What is the “-->” operator in C++?Why do we need virtual functions in C++?Easiest way to convert int to string in C++C++11 introduced a standardized memory model. What does it mean? And how is it going to affect C++ programming?Why is reading lines from stdin much slower in C++ than Python?

Does the growth of home value benefit from compound interest?

Last survivors from different time periods living together

About the expansion of seq_set_split

How to retract the pitched idea from employer?

When conversion from Integer to Single may lose precision

Remove sudoers using script

Why don’t airliners have temporary liveries?

Select items in a list that contain criteria #2

How to generate random points without duplication?

Why don't B747s start takeoffs with full throttle?

Russian equivalents of "no love lost"

Should I "tell" my exposition or give it through dialogue?

How hard would it be to convert a glider into an powered electric aircraft?

How to make a setting relevant?

Float division returns "inf" and 0

How many times can you cast a card exiled by Release to the Wind?

Smooth switching between 12v batteries, with toggle switch

How did students remember what to practise between lessons without any sheet music?

Avoiding cliches when writing gods

How to skip replacing first occurrence of a character in each line?

What are the words for people who cause trouble believing they know better?

What happened to all the nuclear material being smuggled after the fall of the USSR?

Is it possible to (7 day) schedule sleep time of a hard drive?

PL/SQL function to receive a number and return its binary format



Interpreting complex C++ Definition [closed]


What are the differences between a pointer variable and a reference variable in C++?What are POD types in C++?How can I profile C++ code running on Linux?The Definitive C++ Book Guide and ListWhat is the effect of extern “C” in C++?What is the “-->” operator in C++?Why do we need virtual functions in C++?Easiest way to convert int to string in C++C++11 introduced a standardized memory model. What does it mean? And how is it going to affect C++ programming?Why is reading lines from stdin much slower in C++ than Python?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








-5















For a recent class project we were required to modify code within an existing class method in a MIPS simulator. I completed the assignment successfully but it has bothered me that I really didn't have to understand the method definition.



template<class State, class Addr_t, bool Energy>
typename CacheAssoc<State, Addr_t, Energy>::Line
*CacheAssoc<State, Addr_t, Energy>::findLine2Replace(Addr_t addr, bool ignoreLocked)
{
o
o
o


There's a lot going there. Can you help break it down for me?



Here is a link to the header: https://github.com/masc-ucsc/esesc/blob/master/misc/libsuc/CacheCore.h



Here is a link to the code file: https://github.com/masc-ucsc/esesc/blob/master/misc/libsuc/CacheCore.cpp










share|improve this question













closed as too broad by πάντα ῥεῖ, Neil Butterworth, HolyBlackCat, Thomas Sablik, gnat Mar 24 at 18:10


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


















  • I think you mean that you would like help to understand the method declaration, not the method definition. The definition is everything in between . Am I correct?

    – Joakim Thorén
    Mar 24 at 16:38






  • 2





    What don't you understand? It's a template for a member function CacheAssoc<State, Addr_t, Energy>::findLine2Replace with return type typename CacheAssoc<State, Addr_t, Energy>::Line *.

    – Thomas Sablik
    Mar 24 at 16:38












  • Joakim, you are correct in what I was really asking. ty.

    – Dave
    Mar 24 at 17:39

















-5















For a recent class project we were required to modify code within an existing class method in a MIPS simulator. I completed the assignment successfully but it has bothered me that I really didn't have to understand the method definition.



template<class State, class Addr_t, bool Energy>
typename CacheAssoc<State, Addr_t, Energy>::Line
*CacheAssoc<State, Addr_t, Energy>::findLine2Replace(Addr_t addr, bool ignoreLocked)
{
o
o
o


There's a lot going there. Can you help break it down for me?



Here is a link to the header: https://github.com/masc-ucsc/esesc/blob/master/misc/libsuc/CacheCore.h



Here is a link to the code file: https://github.com/masc-ucsc/esesc/blob/master/misc/libsuc/CacheCore.cpp










share|improve this question













closed as too broad by πάντα ῥεῖ, Neil Butterworth, HolyBlackCat, Thomas Sablik, gnat Mar 24 at 18:10


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


















  • I think you mean that you would like help to understand the method declaration, not the method definition. The definition is everything in between . Am I correct?

    – Joakim Thorén
    Mar 24 at 16:38






  • 2





    What don't you understand? It's a template for a member function CacheAssoc<State, Addr_t, Energy>::findLine2Replace with return type typename CacheAssoc<State, Addr_t, Energy>::Line *.

    – Thomas Sablik
    Mar 24 at 16:38












  • Joakim, you are correct in what I was really asking. ty.

    – Dave
    Mar 24 at 17:39













-5












-5








-5








For a recent class project we were required to modify code within an existing class method in a MIPS simulator. I completed the assignment successfully but it has bothered me that I really didn't have to understand the method definition.



template<class State, class Addr_t, bool Energy>
typename CacheAssoc<State, Addr_t, Energy>::Line
*CacheAssoc<State, Addr_t, Energy>::findLine2Replace(Addr_t addr, bool ignoreLocked)
{
o
o
o


There's a lot going there. Can you help break it down for me?



Here is a link to the header: https://github.com/masc-ucsc/esesc/blob/master/misc/libsuc/CacheCore.h



Here is a link to the code file: https://github.com/masc-ucsc/esesc/blob/master/misc/libsuc/CacheCore.cpp










share|improve this question














For a recent class project we were required to modify code within an existing class method in a MIPS simulator. I completed the assignment successfully but it has bothered me that I really didn't have to understand the method definition.



template<class State, class Addr_t, bool Energy>
typename CacheAssoc<State, Addr_t, Energy>::Line
*CacheAssoc<State, Addr_t, Energy>::findLine2Replace(Addr_t addr, bool ignoreLocked)
{
o
o
o


There's a lot going there. Can you help break it down for me?



Here is a link to the header: https://github.com/masc-ucsc/esesc/blob/master/misc/libsuc/CacheCore.h



Here is a link to the code file: https://github.com/masc-ucsc/esesc/blob/master/misc/libsuc/CacheCore.cpp







c++






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 24 at 15:22









DaveDave

312




312




closed as too broad by πάντα ῥεῖ, Neil Butterworth, HolyBlackCat, Thomas Sablik, gnat Mar 24 at 18:10


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









closed as too broad by πάντα ῥεῖ, Neil Butterworth, HolyBlackCat, Thomas Sablik, gnat Mar 24 at 18:10


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • I think you mean that you would like help to understand the method declaration, not the method definition. The definition is everything in between . Am I correct?

    – Joakim Thorén
    Mar 24 at 16:38






  • 2





    What don't you understand? It's a template for a member function CacheAssoc<State, Addr_t, Energy>::findLine2Replace with return type typename CacheAssoc<State, Addr_t, Energy>::Line *.

    – Thomas Sablik
    Mar 24 at 16:38












  • Joakim, you are correct in what I was really asking. ty.

    – Dave
    Mar 24 at 17:39

















  • I think you mean that you would like help to understand the method declaration, not the method definition. The definition is everything in between . Am I correct?

    – Joakim Thorén
    Mar 24 at 16:38






  • 2





    What don't you understand? It's a template for a member function CacheAssoc<State, Addr_t, Energy>::findLine2Replace with return type typename CacheAssoc<State, Addr_t, Energy>::Line *.

    – Thomas Sablik
    Mar 24 at 16:38












  • Joakim, you are correct in what I was really asking. ty.

    – Dave
    Mar 24 at 17:39
















I think you mean that you would like help to understand the method declaration, not the method definition. The definition is everything in between . Am I correct?

– Joakim Thorén
Mar 24 at 16:38





I think you mean that you would like help to understand the method declaration, not the method definition. The definition is everything in between . Am I correct?

– Joakim Thorén
Mar 24 at 16:38




2




2





What don't you understand? It's a template for a member function CacheAssoc<State, Addr_t, Energy>::findLine2Replace with return type typename CacheAssoc<State, Addr_t, Energy>::Line *.

– Thomas Sablik
Mar 24 at 16:38






What don't you understand? It's a template for a member function CacheAssoc<State, Addr_t, Energy>::findLine2Replace with return type typename CacheAssoc<State, Addr_t, Energy>::Line *.

– Thomas Sablik
Mar 24 at 16:38














Joakim, you are correct in what I was really asking. ty.

– Dave
Mar 24 at 17:39





Joakim, you are correct in what I was really asking. ty.

– Dave
Mar 24 at 17:39












1 Answer
1






active

oldest

votes


















2














This is the definition of the findLine2Replace method for the template class CacheAssoc (including everything within the braces which you have omitted).



template<class State, class Addr_t, bool Energy>


These are the template parameters, the first two are type template parameters and the final one is a boolean parameter (can only be true or false). This should be the same as it appears for the class definition.



typename CacheAssoc<State, Addr_t, Energy>::Line*


This is the function return type. The typename keyword is necessary as CacheAssoc is a dependent type, it relies on unknown template parameters. ::Line must be a type that is defined within the CacheAssoc class.



CacheAssoc<State, Addr_t, Energy>::findLine2Replace(Addr_t addr, bool ignoreLocked)


Is the function name and argument list. If you were to define this method within the scope of the CacheAssoc class, the following would not be necessary CacheAssoc<State, Addr_t, Energy>::, however as this is not the case, it is necessary.






share|improve this answer

























  • Mansoor. Your answer is exactly the information what I hoping looking for. Thank you.

    – Dave
    Mar 25 at 5:37

















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














This is the definition of the findLine2Replace method for the template class CacheAssoc (including everything within the braces which you have omitted).



template<class State, class Addr_t, bool Energy>


These are the template parameters, the first two are type template parameters and the final one is a boolean parameter (can only be true or false). This should be the same as it appears for the class definition.



typename CacheAssoc<State, Addr_t, Energy>::Line*


This is the function return type. The typename keyword is necessary as CacheAssoc is a dependent type, it relies on unknown template parameters. ::Line must be a type that is defined within the CacheAssoc class.



CacheAssoc<State, Addr_t, Energy>::findLine2Replace(Addr_t addr, bool ignoreLocked)


Is the function name and argument list. If you were to define this method within the scope of the CacheAssoc class, the following would not be necessary CacheAssoc<State, Addr_t, Energy>::, however as this is not the case, it is necessary.






share|improve this answer

























  • Mansoor. Your answer is exactly the information what I hoping looking for. Thank you.

    – Dave
    Mar 25 at 5:37















2














This is the definition of the findLine2Replace method for the template class CacheAssoc (including everything within the braces which you have omitted).



template<class State, class Addr_t, bool Energy>


These are the template parameters, the first two are type template parameters and the final one is a boolean parameter (can only be true or false). This should be the same as it appears for the class definition.



typename CacheAssoc<State, Addr_t, Energy>::Line*


This is the function return type. The typename keyword is necessary as CacheAssoc is a dependent type, it relies on unknown template parameters. ::Line must be a type that is defined within the CacheAssoc class.



CacheAssoc<State, Addr_t, Energy>::findLine2Replace(Addr_t addr, bool ignoreLocked)


Is the function name and argument list. If you were to define this method within the scope of the CacheAssoc class, the following would not be necessary CacheAssoc<State, Addr_t, Energy>::, however as this is not the case, it is necessary.






share|improve this answer

























  • Mansoor. Your answer is exactly the information what I hoping looking for. Thank you.

    – Dave
    Mar 25 at 5:37













2












2








2







This is the definition of the findLine2Replace method for the template class CacheAssoc (including everything within the braces which you have omitted).



template<class State, class Addr_t, bool Energy>


These are the template parameters, the first two are type template parameters and the final one is a boolean parameter (can only be true or false). This should be the same as it appears for the class definition.



typename CacheAssoc<State, Addr_t, Energy>::Line*


This is the function return type. The typename keyword is necessary as CacheAssoc is a dependent type, it relies on unknown template parameters. ::Line must be a type that is defined within the CacheAssoc class.



CacheAssoc<State, Addr_t, Energy>::findLine2Replace(Addr_t addr, bool ignoreLocked)


Is the function name and argument list. If you were to define this method within the scope of the CacheAssoc class, the following would not be necessary CacheAssoc<State, Addr_t, Energy>::, however as this is not the case, it is necessary.






share|improve this answer















This is the definition of the findLine2Replace method for the template class CacheAssoc (including everything within the braces which you have omitted).



template<class State, class Addr_t, bool Energy>


These are the template parameters, the first two are type template parameters and the final one is a boolean parameter (can only be true or false). This should be the same as it appears for the class definition.



typename CacheAssoc<State, Addr_t, Energy>::Line*


This is the function return type. The typename keyword is necessary as CacheAssoc is a dependent type, it relies on unknown template parameters. ::Line must be a type that is defined within the CacheAssoc class.



CacheAssoc<State, Addr_t, Energy>::findLine2Replace(Addr_t addr, bool ignoreLocked)


Is the function name and argument list. If you were to define this method within the scope of the CacheAssoc class, the following would not be necessary CacheAssoc<State, Addr_t, Energy>::, however as this is not the case, it is necessary.







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 24 at 22:41

























answered Mar 24 at 16:46









MansoorMansoor

97110




97110












  • Mansoor. Your answer is exactly the information what I hoping looking for. Thank you.

    – Dave
    Mar 25 at 5:37

















  • Mansoor. Your answer is exactly the information what I hoping looking for. Thank you.

    – Dave
    Mar 25 at 5:37
















Mansoor. Your answer is exactly the information what I hoping looking for. Thank you.

– Dave
Mar 25 at 5:37





Mansoor. Your answer is exactly the information what I hoping looking for. Thank you.

– Dave
Mar 25 at 5:37





Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript