Bug #12949

Missing user-provided default constructors for ELslProxy objects

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

Target version:
Start date:
Due date:
% Done:


Estimated time:
0.50 h


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
        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

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).


#1 Updated by Kyle Knoepfel over 4 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 4 years ago

Implemented with commit messagefacility:a9c21cc1.

#3 Updated by Kyle Knoepfel over 4 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 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF