Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tipo di ritorno di transposed() const #5

Closed
sydernee opened this issue Mar 1, 2018 · 2 comments
Closed

Tipo di ritorno di transposed() const #5

sydernee opened this issue Mar 1, 2018 · 2 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@sydernee
Copy link
Owner

sydernee commented Mar 1, 2018

Il metodo Matrix transposed() const ritorna un Matrix: non sarebbe più corretto ritornare un Matrix*?

In particolare stavo pensando che la trasposta di una SquareMatrix dovesse ragionevolemente essere ancora una SquareMatrix: è corretto come ragionamento o è meglio mantenere così?

@sydernee sydernee added help wanted Extra attention is needed question Further information is requested labels Mar 1, 2018
@Vashy
Copy link
Collaborator

Vashy commented Mar 1, 2018

Logicamente, sembra corretto.
Lasciando così, se fosse virtuale, e venisse ridefinita in SquareMatrix (ritornando un oggetto SquareMatrix), non compilerebbe, giusto?

@sydernee
Copy link
Owner Author

sydernee commented Mar 1, 2018

Dato che varierebbe solo il tipo di ritorno(e non sarebbe covariante), direi proprio di sì.

sydernee added a commit that referenced this issue Mar 1, 2018
@sydernee sydernee closed this as completed Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants