|
|
|
|
|
by cjhanks
3314 days ago
|
|
For similar reasons it seems inappropriate for PIMPL. The template indirectly calls `sizeof(...)` on the template type. When that type is not concrete (which is likely the case with PIMPL) the code will not compile. The `value_ptr_example_pimpl.hpp` example doesn't compile for me using GCC 5.4. |
|
Moving those methods to value_ptr_example_pimpl.cpp, just as you'd normally do for PIMPL makes the compiler happy.
This works for me in VS2017 but should work on any C++11 compliant compiler: https://gist.github.com/SeanCline/55d700d4fbf8cc1bdaeb44b547...