Project

General

Profile

Bug #3805

can't construct Selector with OR join

Added by Ben Loer over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Navigation
Target version:
Start date:
05/02/2013
Due date:
% Done:

100%

Estimated time:
2.00 h
Occurs In:
Scope:
Internal
Experiment:
-
SSI Package:
Duration:

Description

Error message below. Specifically I was trying to do

Selector s( ProductInstanceName a("label1") || ProductInstanceName b("label2") );

/ds50/app/products/art/v1_06_00/include/art/Framework/Principal/SelectorBase.h:24:27: note:     virtual art::SelectorBase* art::SelectorBase::clone() const
/ds50/app/products/art/v1_06_00/include/art/Framework/Principal/Selector.h: In instantiation of ‘typename std::enable_if<(std::is_base_of<art::SelectorBase, A>::value && std::is_base_of<art::SelectorBase, B>::value), art::OrHelper<A, B> >::type art::operator||(const A&, const B&) [with A = art::ProductInstanceNameSelector; B = art::ProductInstanceNameSelector; typename std::enable_if<(std::is_base_of<art::SelectorBase, A>::value && std::is_base_of<art::SelectorBase, B>::value), art::OrHelper<A, B> >::type = art::OrHelper<art::ProductInstanceNameSelector, art::ProductInstanceNameSelector>]’:
/ds50/app/products/art/v1_06_00/include/art/Framework/Principal/Selector.h:230:1: error: invalid abstract return type for function ‘typename std::enable_if<(std::is_base_of<art::SelectorBase, A>::value && std::is_base_of<art::SelectorBase, B>::value), art::OrHelper<A, B> >::type art::operator||(const A&, const B&) [with A = art::ProductInstanceNameSelector; B = art::ProductInstanceNameSelector; typename std::enable_if<(std::is_base_of<art::SelectorBase, A>::value && std::is_base_of<art::SelectorBase, B>::value), art::OrHelper<A, B> >::type = art::OrHelper<art::ProductInstanceNameSelector, art::ProductInstanceNameSelector>]’
/ds50/app/products/art/v1_06_00/include/art/Framework/Principal/Selector.h:214:12: note:   since type ‘art::OrHelper<art::ProductInstanceNameSelector, art::ProductInstanceNameSelector>’ has pure virtual functions
/ds50/app/products/art/v1_06_00/include/art/Framework/Principal/Selector.h:231:32: error: cannot allocate an object of abstract type ‘art::OrHelper<art::ProductInstanceNameSelector, art::ProductInstanceNameSelector>’
/ds50/app/products/art/v1_06_00/include/art/Framework/Principal/Selector.h:214:12: note:   since type ‘art::OrHelper<art::ProductInstanceNameSelector, art::ProductInstanceNameSelector>’ has pure virtual functions
cc1plus: all warnings being treated as errors

History

#1 Updated by Marc Paterno over 7 years ago

  • Category set to Navigation
  • Status changed from New to Accepted
  • Assignee set to Marc Paterno

#2 Updated by Marc Paterno over 7 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100
  • Estimated time set to 2.00 h

The problem was the lack of const-qualification of the clone function in OrHelper, combined with lack of a test that used OrHelper. This is now fixed.

#3 Updated by Christopher Green over 7 years ago

  • Target version set to 1.07.00

#4 Updated by Christopher Green over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF