Templated copy-constructor fails with specific templated type

前端 未结 2 1768
别那么骄傲
别那么骄傲 2020-12-18 00:06

As some of my code required implicit conversion between matrices of different types (e.g. Matrix to Matrix), I defined a t

2条回答
  •  猫巷女王i
    2020-12-18 00:20

    I'm not entirely clear from your question, but I suspect what is happening is that the default copy constructor (which does a memberwise copy only) is being used in some places in your code. Remember, not only the code you actually write uses the copy constructor - the compiler uses it too.

提交回复
热议问题