mrosenbladt / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Implicit copying ctor and operator=(in class inherited from boost::noncopyable) #269

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run CMake with args like this: -DCMAKE_BUILD_TYPE=Debug 
-DCMAKE_CXX_COMPILER=clang++ -DBUILD_SHARED_LIBS=On
2. Try to build with clang(MinGW) from MSYS2

What is the expected output? What do you see instead?
It should build properly but i get that message: 
"D:\Projects\MCraft\deps\yaml-cpp\include\yaml-cpp\node\detail\node_data.h:32: 
error: base class 'boost::noncopyable' (aka 'boost::noncopyable_::noncopyable') 
has private copy constructor
class YAML_CPP_API node_data : private boost::noncopyable {
                   ^"
and same message for implicitly defined operator=

What version of the product are you using? On what operating system?
0.5.1 on Windows

Please provide any additional information below.
That happens only when builduing shared library and only with Clang under 
Windows

Original issue reported on code.google.com by morfi...@gmail.com on 9 Jan 2015 at 10:28

GoogleCodeExporter commented 9 years ago
Please post the entire error message.

Original comment by jbe...@gmail.com on 9 Jan 2015 at 1:43

GoogleCodeExporter commented 9 years ago
In file included from D:\Projects\MyProject\deps\yaml-cpp\src\convert.cpp:3:
In file included from 
D:/Projects/MyProject/deps/yaml-cpp/include\yaml-cpp/node/convert.h:17:
In file included from 
D:/Projects/MyProject/deps/yaml-cpp/include\yaml-cpp/node/impl.h:13:
In file included from 
D:/Projects/MyProject/deps/yaml-cpp/include\yaml-cpp/node/detail/node.h:13:
In file included from 
D:/Projects/MyProject/deps/yaml-cpp/include\yaml-cpp/node/detail/node_ref.h:13:
D:/Projects/MyProject/deps/yaml-cpp/include\yaml-cpp/node/detail/node_data.h:32:
20: error: base class 'boost::noncopyable' (aka 
'boost::noncopyable_::noncopyable') has private copy constructor
class YAML_CPP_API node_data : private boost::noncopyable {
                   ^
D:/msys2/mingw64/include\boost/core/noncopyable.hpp:38:7: note: declared 
private here
      noncopyable( const noncopyable& );
      ^
D:/Projects/MyProject/deps/yaml-cpp/include\yaml-cpp/node/detail/node_data.h:32:
20: note: implicit copy constructor for 'YAML::detail::node_data' first 
required here
class YAML_CPP_API node_data : private boost::noncopyable {
                   ^
D:/Projects/MyProject/deps/yaml-cpp/include\yaml-cpp/node/detail/node_data.h:32:
20: error: 'operator=' is a private member of 'boost::noncopyable_::noncopyable'
class YAML_CPP_API node_data : private boost::noncopyable {
                   ^
D:/msys2/mingw64/include\boost/core/noncopyable.hpp:39:20: note: declared 
private here
      noncopyable& operator=( const noncopyable& );
                   ^
D:/Projects/MyProject/deps/yaml-cpp/include\yaml-cpp/node/detail/node_data.h:32:
20: note: implicit copy assignment operator for 'YAML::detail::node_data' first 
required here
class YAML_CPP_API node_data : private boost::noncopyable {
                   ^
2 errors generated.

Original comment by morfi...@gmail.com on 9 Jan 2015 at 1:50

GoogleCodeExporter commented 9 years ago
I don't understand where the implicit copy constructor for node_data is 
actually requested. This is the whole error message?

Original comment by jbe...@gmail.com on 9 Jan 2015 at 2:10

GoogleCodeExporter commented 9 years ago
Yes that's whole message: i don't understand as well. Those could be just a bug 
of clang on Windows

Original comment by morfi...@gmail.com on 10 Jan 2015 at 11:11