Project

General

Profile

Actions

Bug #1093

closed

Build error with Visual Studio 2022 and /std:c++20

Added by Marco Eichelberg almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Library and Apps
Target version:
Start date:
2023-12-03
Due date:
% Done:

100%

Estimated time:
Module:
ofstd
Operating System:
Compiler:

Description

Robert Habrich <> writes:
We are using dcmtk 3.6.7 and were successfully building with Visual Studio 2019 and /std:c++17 so far.
We now wanted to upgrade to Visual Studio 2022 and /std:c++20. However, the build of dcmtk fails with the following compiler error:

4>dcmtk\ofstd\libsrc\ofcmdln.cc(1246,77): error C2280: 'std::basic_ostream<char,std::char_traits<char>> &std::operator <<<std::char_traits<char>>(std::basic_ostream<char,std::char_traits<char>> &,wchar_t)': attempting to reference a deleted function
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\include\ostream(968,31): message : see declaration of 'std::operator <<'
4>dcmtk\ofstd\libsrc\ofcmdln.cc(1246,77): error C2088: '<<': illegal for class

For a fix, the wchar_t (block) needs to be converted to something std::ostream operator<< accepts (e.g.char or OFString).
Some underlying context from an MSVC developer: https://github.com/osquery/osquery/issues/6234

Reported 2023-12-01 by Robert Habrich <>

Actions #1

Updated by Marco Eichelberg over 1 year ago

  • Status changed from New to Closed
  • Assignee set to Marco Eichelberg
  • % Done changed from 0 to 100

Closed by commit #08fe28737.

Actions

Also available in: Atom PDF