[PATCH] D57018: Fix lvm::is_trivially_copyable portability issues

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 21 14:53:15 PST 2019


fedor.sergeev added a comment.

it does *not* work on my shorter reproducer:

  ] g++ -std=c++11 -I ../../llvm/include -I include ../../llvm/copyable_with_llvm.cpp 
  ../../llvm/copyable_with_llvm.cpp: In instantiation of ‘struct TrieNode<StackIdData>’:
  ../../llvm/include/llvm/Support/type_traits.h:118:34:   required by substitution of ‘template<class T> using IsCopyAssignableImpl = decltype ((declval<T&>)()=(declval<const T&>)()) [with T = llvm::detail::trivial_helper<TrieNode<StackIdData>*>]’
  ../../llvm/include/llvm/Support/type_traits.h:114:8:   required from ‘struct llvm::detail::IsDetected<llvm::detail::IsCopyAssignableImpl, llvm::detail::trivial_helper<TrieNode<StackIdData>*> >’
  ../../llvm/include/llvm/Support/type_traits.h:149:8:   required from ‘struct llvm::is_copy_assignable<llvm::detail::trivial_helper<TrieNode<StackIdData>*> >’
  ../../llvm/include/llvm/Support/type_traits.h:174:25:   required from ‘constexpr const bool llvm::is_trivially_copyable<TrieNode<StackIdData>*>::has_trivial_copy_assign’
  ../../llvm/include/llvm/Support/type_traits.h:195:32:   required from ‘constexpr const bool llvm::is_trivially_copyable<TrieNode<StackIdData>*>::value’
  ../../llvm/copyable_with_llvm.cpp:12:64:   required from here
  ../../llvm/copyable_with_llvm.cpp:7:18: error: ‘TrieNode<AssociatedData>::ExtraData’ has incomplete type
     AssociatedData ExtraData;
                    ^
  ../../llvm/copyable_with_llvm.cpp:10:8: error: forward declaration of ‘struct StackIdData’
   struct StackIdData {
          ^

Started full build, will report as soon as it is ready.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57018/new/

https://reviews.llvm.org/D57018





More information about the llvm-commits mailing list