Project

General

Profile

Bug #12949

Missing user-provided default constructors for ELslProxy objects

Added by Ben Morgan over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
06/17/2016
Due date:
% Done:

100%

Estimated time:
0.50 h
Duration:

Description

Compiling the latest updates to MessageFacility using Apple Clang results in several compile errors in ELseverityLevel:

messagefacility/Auxiliaries/ELseverityLevel.h:169:48: error: default
      initialization of an object of const type 'const
      ELslProxy<ELzeroSeverityGen>' without a user-provided default
      constructor
        ELslProxy< ELzeroSeverityGen    > constexpr  ELzeroSeverity;
                                                     ^

and similar for the following lines and ELslProxy instances.

This relates, I think, to N3797 8.5/7 in the C++ Standard regarding default initialization of const-qualified objects. GCC is known to apply a workaround here, whilst Clang enforces the Standard (see,
for example https://stackoverflow.com/questions/21900237/do-i-really-need-to-implement-user-provided-constructor-for-const-objects)

The attached patch resolves the compiler errors, but may not be the optimal solution (tests partially pass, but many still fail on OS X due to the blocking DYLD_LIBRARY_PATH issue in cetlib).

History

#1 Updated by Kyle Knoepfel over 3 years ago

  • Status changed from New to Assigned
  • Assignee set to Kyle Knoepfel
  • Estimated time set to 0.50 h

Thanks, Ben. Actually this is a somewhat-open issue in the standard, but you are correct that clang follows the current standard more closely for this particular instance. Your solution is the correct one. Will apply as provided.

FYI, the messagefacility system is in a state of flux at the moment--headers/source code being rearranged.

#2 Updated by Kyle Knoepfel over 3 years ago

Implemented with commit messagefacility:a9c21cc1.

#3 Updated by Kyle Knoepfel over 3 years ago

  • Status changed from Assigned to Resolved
  • Target version set to 2.02.00
  • % Done changed from 0 to 100

#4 Updated by Kyle Knoepfel over 3 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF