Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8020077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:35:13+00:00 2026-06-04T21:35:13+00:00

I am trying to detach elements from a boost::intrusive set and getting a assertion

  • 0

I am trying to detach elements from a boost::intrusive set and getting a assertion failure.
when i delete the element after detaching it from the container.

The class derives from set_base_hook.

class fileXfer : public set_base_hook >
70 {

I am using “erase” function to detach the object from the container. when i try to delete the object i get assertion failure. The assertion failure is happening below at the following location.

/usr/local/include/boost/intrusive/detail/utilities.hpp:344: void boost::intrusive::detail::destructor_impl(Hook&, boost::intrusive::detail::link_dispatch<(boost::intrusive::link_mode_type)1u>) [with Hook = boost::intrusive::detail::generic_hook, boost::intrusive::default_tag, (boost::intrusive::link_mode_type)1u, 3>]: Assertion `!hook.is_linked()’ failed.
Aborted (core dumped)

when i looked at the location of the error i saw this command.

341 { //If this assertion raises, you might have destroyed an object
342 //while it was still inserted in a container that is alive.
343 //If so, remove the object from the container before destroying it.
344 (void)hook; BOOST_INTRUSIVE_SAFE_HOOK_DESTRUCTOR_ASSERT(!hook.is_linked());
345 }

pls advise

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T21:35:16+00:00Added an answer on June 4, 2026 at 9:35 pm

    i got this solved after much googling. erase(Classname::s_iterator_to(value)) should be used instead of “erase(value)”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i wonder why in the following example, trying to detach an element ( li
I'm trying to use IMAP function to detach an attachment received from inbox and
Is it possible to detach a native socket from Boost.ASIO's socket class? If so,
Trying to get parameters from a PUT request using HttpServlet#doPut: public void doPut(HttpServletRequest request,
Trying to parse an HTML document and extract some elements (any links to text
trying to start Rails server and getting a warning I don't understand. Anyone know
I am trying to pass a COM object from an ActiveX component to JScript.
I'm trying to use the entity framework to take data (nested relationships) from one
I'm trying to reproduce an example from Network Security with OpenSSL (by Chandra et
I'm trying to set up a form with multiple dropdown lists, that will allow

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.