This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/80761] New: std::set<T,C,A>::insert_return_type uses wrong iterator type


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80761

            Bug ID: 80761
           Summary: std::set<T,C,A>::insert_return_type uses wrong
                    iterator type
           Product: gcc
           Version: 7.1.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

#include <set>

int main()
{
  auto [ins, pos, node] = std::set<int>::insert_return_type{};
  static_assert( std::is_same_v<bool, decltype(ins)> );
  static_assert( std::is_same_v<std::set<int>::iterator, decltype(pos)> );
  static_assert( std::is_same_v<std::set<int>::node_type, decltype(node)> );
}


ins.cc: In function ‘int main()’:
ins.cc:7:3: error: static assertion failed
   static_assert( std::is_same_v<std::set<int>::iterator, decltype(pos)> );
   ^~~~~~~~~~~~~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]