Skip to content
Snippets Groups Projects

WIP: convert uniqueptrs in map to shared pointers to avoid Linux compile error...

Closed Jan Delember requested to merge fix/uniqueptr_Linux_error into develop

convert uniqueptrs in map to shared pointers to avoid Linux compiled error with implicitely-deleted copy constructors

Error on Linux was:

In file included from /home/gitlab-runner/builds/2TXEsWXa/0/VR-Group/unreal-character-test/Plugins/universallogging/Intermediate/Build/Linux/B4D820EA/UE4Editor/Development/UniversalLogging/Module.UniversalLogging.cpp:1:
  In file included from /home/gitlab-runner/builds/2TXEsWXa/0/VR-Group/unreal-character-test/Intermediate/Build/Linux/B4D820EA/UnrealCharacterTestEditor/Development/Engine/SharedPCH.Engine.h:208:
  In file included from /home/gitlab-runner/Unreal_4_22/RocketBuild/Engine/Source/Runtime/Engine/Public/EngineSharedPCH.h:52:
  In file included from /home/gitlab-runner/Unreal_4_22/RocketBuild/Engine/Source/Runtime/Core/Public/Misc/Compression.h:5:
  In file included from Runtime/Core/Public/CoreMinimal.h:91:
  /home/gitlab-runner/Unreal_4_22/RocketBuild/Engine/Source/Runtime/Core/Public/Containers/Set.h:168:53: error: call to implicitly-deleted copy constructor of 'TSetElement<TTuple<FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> > > >::ElementType' (aka 'TTuple<FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> > >')
          FORCEINLINE TSetElement(const TSetElement&  Rhs) : Value(                   Rhs.Value ), HashNextId(         Rhs.HashNextId ), HashIndex(Rhs.HashIndex) {}
                                                             ^                        ~~~~~~~~~
  /home/gitlab-runner/Unreal_4_22/RocketBuild/Engine/Source/Runtime/Core/Public/Containers/SparseArray.h:687:47: note: in instantiation of member function 'TSetElement<TTuple<FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> > > >::TSetElement' requested here
                                                  ::new((uint8*)&DestElement.ElementData) ElementType(*(const ElementType*)&SrcElement.ElementData);
                                                                                          ^
  /home/gitlab-runner/Unreal_4_22/RocketBuild/Engine/Source/Runtime/Core/Public/Containers/Set.h:265:13: note: in instantiation of member function 'TSparseArray<TSetElement<TTuple<FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> > > >, TSparseArrayAllocator<FDefaultAllocator, FDefaultBitArrayAllocator> >::operator=' requested here
                          Elements = Copy.Elements;
                                   ^
  /home/gitlab-runner/Unreal_4_22/RocketBuild/Engine/Source/Runtime/Core/Public/Containers/Set.h:232:9: note: in instantiation of member function 'TSet<TTuple<FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> > >, TDefaultMapHashableKeyFuncs<FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> >, false>, FDefaultSetAllocator>::operator=' requested here
                  *this = Copy;
                        ^
  /home/gitlab-runner/Unreal_4_22/RocketBuild/Engine/Source/Runtime/Core/Public/Containers/Map.h:121:2: note: in instantiation of member function 'TSet<TTuple<FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> > >, TDefaultMapHashableKeyFuncs<FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> >, false>, FDefaultSetAllocator>::TSet' requested here
          TMapBase(const TMapBase&) = default;
          ^
  /home/gitlab-runner/Unreal_4_22/RocketBuild/Engine/Source/Runtime/Core/Public/Templates/Tuple.h:636:3: note: explicitly defaulted function was implicitly deleted here
                  TTuple(const TTuple&) = default;
                  ^
  /home/gitlab-runner/Unreal_4_22/RocketBuild/Engine/Source/Runtime/Core/Public/Templates/Tuple.h:608:17: note: copy constructor of 'TTuple<FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> > >' is implicitly deleted because base class 'UE4Tuple_Private::TTupleImpl<TMakeIntegerSequence<uint32, sizeof...(Types)>, FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> > >' (aka 'TTupleImpl<TIntegerSequence<unsigned int, 0, 1>, FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> > >') has a deleted copy constructor
  struct TTuple : UE4Tuple_Private::TTupleImpl<TMakeIntegerSequence<uint32, sizeof...(Types)>, Types...>
                  ^
  /home/gitlab-runner/Unreal_4_22/RocketBuild/Engine/Source/Runtime/Core/Public/Templates/Tuple.h:375:4: note: explicitly defaulted function was implicitly deleted here
                          TTupleImpl(const TTupleImpl& Other) = default;
                          ^
  /home/gitlab-runner/Unreal_4_22/RocketBuild/Engine/Source/Runtime/Core/Public/Templates/Tuple.h:346:70: note: copy constructor of 'TTupleImpl<TIntegerSequence<unsigned int, 0, 1>, FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> > >' is implicitly deleted because base class 'TTupleStorage<TIntegerSequence<uint32, 0U, 1U>, FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> > >' (aka 'TTupleStorage<TIntegerSequence<unsigned int, 0U, 1U>, FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> > >') has a deleted copy constructor
          struct TTupleImpl<TIntegerSequence<uint32, Indices...>, Types...> : TTupleStorage<TIntegerSequence<uint32, Indices...>, Types...>
                                                                              ^
  /home/gitlab-runner/Unreal_4_22/RocketBuild/Engine/Source/Runtime/Core/Public/Templates/Tuple.h:303:4: note: explicitly defaulted function was implicitly deleted here
                          TTupleStorage(const TTupleStorage&) = default;
                          ^
  /home/gitlab-runner/Unreal_4_22/RocketBuild/Engine/Source/Runtime/Core/Public/Templates/Tuple.h:339:15: note: copy constructor of 'TTupleStorage<TIntegerSequence<unsigned int, 0, 1>, FString, TUniquePtr<LogFileStream, TDefaultDelete<LogFileStream> > >' is implicitly deleted because field 'Value' has an inaccessible copy constructor
                  InValueType Value;
                              ^
  1 error generated.
Edited by Jan Delember

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Jan Delember marked this merge request as draft

    marked this merge request as draft

    By Jonathan Ehret on 2021-02-18T10:21:44 (imported from GitLab)

  • Jan Delember changed title from convert uniqueptrs in map to shared pointers to avoid Linux compile error... to ^WIP: convert uniqueptrs in map to shared pointers to avoid Linux compile error...

    changed title from convert uniqueptrs in map to shared pointers to avoid Linux compile error... to ^WIP: convert uniqueptrs in map to shared pointers to avoid Linux compile error...

    By Jonathan Ehret on 2021-02-18T10:21:44 (imported from GitLab)

  • Author Contributor

    @mbellgardt wants to first take a look at this whether there is a nicer solution than just converting them

    By Jonathan Ehret on 2021-02-18T10:22:15 (imported from GitLab)

  • Jan Delember changed title from ^WIP: convert uniqueptrs in map to shared pointers to avoid Linux compile error... to WIP: convert uniqueptrs in map to shared pointers to avoid Linux compile error...

    changed title from ^WIP: convert uniqueptrs in map to shared pointers to avoid Linux compile error... to WIP: convert uniqueptrs in map to shared pointers to avoid Linux compile error...

    By Jonathan Ehret on 2021-02-18T10:22:23 (imported from GitLab)

  • Author Contributor

    Should not be merged in favor of !9 (merged) imo.

    By Martin Bellgardt on 2021-02-26T13:44:10 (imported from GitLab)

Please register or sign in to reply
Loading