[xsd-users] c++11 refers to a deleted function.

Paul McGrath paul.s.mcgrath at gmail.com
Wed Mar 29 09:34:51 EDT 2023


Hello,

I'm having an error with the following line in the generated code.

    AssociationDetails_lib::
    AssociationDetails_lib (::std::unique_ptr< value_type > p)
    : value_ (p, 0)

gives an error of:

Severity Code Description Project File Line Suppression State
Error (active) E1776 function "std::unique_ptr<_Ty, _Dx>::unique_ptr(const
std::unique_ptr<_Ty, _Dx> &) [with
_Ty=bellshire::lib::ComponentDetails::AssociationDetails_type,
_Dx=std::default_delete<bellshire::lib::ComponentDetails::AssociationDetails_type>]"
(declared at line 3317 of "C:\Program Files\Microsoft Visual
Studio\2022\Community\VC\Tools\MSVC\14.36.32502\include\memory") cannot be
referenced -- it is a deleted function BT-MatML-Editor
C:\Users\paulm\source\repos\BT-MatML-Editor\src\MatML_Lib\matml31_lib.cxx
12737

it seems to be referring to a  deleted function in <memory> header:

    unique_ptr(const unique_ptr&)            = delete;
    unique_ptr& operator=(const unique_ptr&) = delete;

Admittedly, I don't know where the const comes from in the deleted function.

This code was generated by

 xsd cxx-tree --std c++11 --namespace-map =bellshire::lib
 --generate-element-map --generate-element-type matml31_lib.xsd

Let me know if you need any more information.

Thanks for your help
Paul


More information about the xsd-users mailing list