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 4026620
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:59:36+00:00 2026-05-20T10:59:36+00:00

I am using the boost::multi_index_container (as follows) and I am running into a compile

  • 0

I am using the boost::multi_index_container (as follows) and I am running into a compile error when trying to typedef the index:

struct del_t
{
  string del_id;
  string dev_version;
};

struct count_container_t
{
  uint32_t count_1;
  uint32_t count_2;
};

struct mic_t
{
  del_t d;
  uint32_t p;
  string c;
  map<uint32_t, count_container_t> b;
};

typedef multi_index_container
<mic_t,

 indexed_by
 <ordered_unique<member<mic_t,
                        del_t,
                        &mic_t::d>
                 >
  >
 > super_mic_t;

//The following line is causing the compile error. Compiles fine without it.
typedef super_mic_t::nth_index<0>::type zeroth_index_t; 

Error details:

/usr/include/boost/multi_index/detail/base_type.hpp:54: error: invalid use 
of incomplete type 'struct 
boost::multi_index::ordered_unique<boost::multi_index::member<mic_t, 
del_t, &mic_t::d>, mpl_::na, mpl_::na>'

Tried variants of using typename and template but I guess I am not doing it right (as I haven’t understood the problem correctly, to be able to solve it correctly).

Any help would be most appreciated.

Thanks.

PS: I am using ‘g++ (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu4)’ and ‘boost-1.42’.

  • 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-05-20T10:59:37+00:00Added an answer on May 20, 2026 at 10:59 am

    It looks like you may be missing a needed include, possibly for ordered_unique::nth_index.

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

Sidebar

Related Questions

I'm using boost::multi_index_container and I'm trying to refer to a member of a member
I am trying to do one multi map(4 variables) using boost- multi index. Can
I'm using boost uuid to generate session ids. std::string SessionGenerator::generate() { boost::uuids::uuid id =
I'm currently using Boost's multi-index to help keep track of how many times a
I'm using a boost::multi_index_container to provide a random access and a hash-based access to
I am changing a single thread program into multi thread using boost:thread library. The
Using Boost Program Options, how do you get the string equivalent of argv[0]?
I am using a boost::unordered_map<const std::string, std::list<TypeA> > in a performance critical multi-threaded environment.
I have a boost multi index container thus. using namespace boost::multi_index; template < typename
Using Boost 1_33_1, I get an error implying that my iterator is a const

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.