Closed bnoazx005 closed 5 years ago
CResult<T, E> works incorrect with non-POD types, especially with STL containers
Win32 / Visual Studio 2017
Try the following code out to reproduce the problem:
CResult<std::vector<int>> resVec = TOkValue<std::vector<int>>({1, 2, 3});
In normal way it should assign data into CResult<T, E> without any problem, but some problem occurs when non-POD data is copied into the internal storage.
'read access violation' exception is thrown in xutility file
Bug report
CResult<T, E> works incorrect with non-POD types, especially with STL containers
Environment
Win32 / Visual Studio 2017
Steps to reproduce the issue
Try the following code out to reproduce the problem:
What's the expected result?
In normal way it should assign data into CResult<T, E> without any problem, but some problem occurs when non-POD data is copied into the internal storage.
What's the actual result?
'read access violation' exception is thrown in xutility file