Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • S src
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 60
    • Issues 60
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OPAL
  • src
  • Issues
  • #423

Closed
Open
Created Jan 09, 2020 by snuverink_j@snuverink_jDeveloper

SIndex<Dim>::clear() template method not compiling

While porting some of the IPPL tests to unit test I got the following compiler error:

In file included from /home/scratch/OPAL/OPAL-fork/OPAL-src/ippl/src/Index/SIndex.h:302:0,
                 from /home/scratch/OPAL/OPAL-fork/OPAL-src/ippl/src/Field/BareField.h:31,
                 from /home/scratch/OPAL/OPAL-fork/OPAL-src/ippl/src/Field/Field.h:15,
                 from /home/scratch/OPAL/OPAL-fork/OPAL-src/tests/ippl_src/Index/Index.cpp:60:
/home/scratch/OPAL/OPAL-fork/OPAL-src/ippl/src/Index/SIndex.hpp: In instantiation of ‘void SIndex<Dim>::clear() [with unsigned int Dim = 2]’:
/home/scratch/OPAL/OPAL-fork/OPAL-src/ippl/src/Index/SIndexAssign.hpp:52:44:   required from ‘static void SIndexAssignTraits<Dim, OpAssign>::initialize(SIndex<Dim>&) [with unsigned int Dim = 2]’
/home/scratch/OPAL/OPAL-fork/OPAL-src/ippl/src/Index/SIndexAssign.hpp:347:41:   required from ‘void assign(SIndex<Dim>&, RHS, OP, const NDIndex<Dim>&, SIExprTag<IsExpr>) [with unsigned int Dim = 2; RHS = PETE_TBTree<OpOr, PETE_TBTree<OpEQ, BareFieldIterator<int, 2>, PETE_Scalar<int> >, PETE_TBTree<OpEQ, BareFieldIterator<int, 2>, PETE_Scalar<int> > >; OP = OpAssign; bool IsExpr = false]’
/home/scratch/OPAL/OPAL-fork/OPAL-src/ippl/src/Index/SIndexAssign.h:72:1:   required from ‘void assign(SIndex<Dim>&, const PETE_Expr<T>&) [with unsigned int Dim = 2; RHS = PETE_TBTree<OpOr, PETE_TBTree<OpEQ, BareFieldIterator<int, 2>, PETE_Scalar<int> >, PETE_TBTree<OpEQ, BareFieldIterator<int, 2>, PETE_Scalar<int> > >]’
/home/scratch/OPAL/OPAL-fork/OPAL-src/ippl/src/Index/SIndex.h:100:11:   required from ‘SIndex<Dim>& SIndex<Dim>::operator=(const PETE_Expr<B>&) [with T1 = PETE_TBTree<OpOr, PETE_TBTree<OpEQ, BareFieldIterator<int, 2>, PETE_Scalar<int> >, PETE_TBTree<OpEQ, BareFieldIterator<int, 2>, PETE_Scalar<int> > >; unsigned int Dim = 2]’
/home/scratch/OPAL/OPAL-fork/OPAL-src/tests/ippl_src/Index/Index.cpp:82:25:   required from here
/home/scratch/OPAL/OPAL-fork/OPAL-src/ippl/src/Index/SIndex.hpp:339:10: error: ‘class std::shared_ptr<LSIndex<2> >’ has no member named ‘CopyForWrite’
     (*a).CopyForWrite();

The method CopyForWrite() is defined in the RefCountedP class LSIndex does not inherit from it (only from class RefCounted).

The relevant templated method was never used (and thus not compiled).

Assignee
Assign to
Time tracking