Project

General

Profile

Bug #13993

Too few template parameters error in TableMemberRegistry using Clang

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

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
10/03/2016
Due date:
% Done:

100%

Estimated time:
Spent time:
Duration:

Description

Compiling fhicl-cpp on macOS (EL Cap, Xcode 7 and 8), an error is emitted when compiling DelgatedParameter.cc:

[  1%] Building CXX object fhiclcpp/CMakeFiles/fhiclcpp.dir/types/DelegatedParameter.cc.o
In file included from /.../fhiclcpp/types/DelegatedParameter.cc:3:
In file included from /.../fhiclcpp/types/DelegatedParameter.h:9:
/.../fhiclcpp/types/detail/TableMemberRegistry.h:75:7: error: too few template parameters in
      template redeclaration
      template <typename T> friend class fhicl::Table;
      ^~~~~~~~~~~~~~~~~~~~~
/.../fhiclcpp/type_traits.h:27:3: note: previous template declaration is here
  template <typename T, typename KeysToIgnore> class Table;
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

This seems like a genuine C++ issue, though am not sure why GCC allows this. The supplied patch resolves the issue by matching the template parameter lists between the traits header and friend declaration.

History

#1 Updated by Kyle Knoepfel about 3 years ago

  • Status changed from New to Accepted

We will review the patch and apply as appropriate.

#2 Updated by Kyle Knoepfel about 3 years ago

  • Status changed from Accepted to Resolved
  • Assignee set to Kyle Knoepfel
  • % Done changed from 0 to 100

Fix implemented with commit fhicl-cpp:2825d21.

#3 Updated by Kyle Knoepfel about 3 years ago

  • Status changed from Resolved to Closed
  • Target version set to 2.05.00


Also available in: Atom PDF