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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:02:33+00:00 2026-06-02T01:02:33+00:00

I install the threading building blocks(http://threadingbuildingblocks.org/ver.php?fid=174) in centos in directory /home/is_admin/tbb40_233oss/ This is my

  • 0

I install the threading building blocks(http://threadingbuildingblocks.org/ver.php?fid=174) in centos in directory /home/is_admin/tbb40_233oss/

This is my code:

#include "tbb/concurrent_queue.h" 
#include <iostream> 
using namespace std; 
using namespace tbb; 
int main() { 
    concurrent_queue<int> queue; 
    for( int i=0; i<10; ++i ) 
        queue.push(i); 
    for( concurrent_queue<int>::const_iterator i(queue.begin()); 
i!=queue.end(); ++i ) 
        cout << *i << " "; 
    cout << endl; 
    return 0; 
}

I compile the code using this command:

g++ test_concurrent_queue.cpp -I/home/is_admin/tbb40_233od/linux_intel64_gcc_cc4.1.2_libc2.5_kernel2.6.18_release -ltbb -o tcq

but it gives this error:

class tbb::strict_ppl::concurrent_queue<int, tbb::cache_aligned_allocator<int> > has no member named begin

class tbb::strict_ppl::concurrent_queue<int, tbb::cache_aligned_allocator<int> > has no member named end

I cann’t find out why? Anybody have tbb experience can help me?

  • 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-02T01:02:34+00:00Added an answer on June 2, 2026 at 1:02 am

    EDIT:

    The documentation you used is outdated and no longer works with concurrent_queue. The rest of my answer still stands.


    Because concurrent_queue has no begin or end method:
    http://threadingbuildingblocks.org/files/documentation/a00134.html

    There is an unsafe_begin and an unsafe_end method, named that way because you should only use them if your queue isn’t being used by more than one thread (that is, they are unsafe to use in a multithreaded environment).

    The general way to run through a queue is to pop elements until it’s empty:

    int i;
    while(queue.try_pop(i)) // as long as you can pop, pop.
        cout << i << " "; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

brew install couchdb fails with: ==> Downloading http://www.apache.org/dyn/closer.cgi?path=couchdb/1.1.1/apache-couchdb-1.1.1.tar.gz File already downloaded in /Users/fairview/Library/Caches/Homebrew ==>
I Install Apache 2.2 + PHP 5.2 and want to use any MySQL functions
Install xampp-win32-1.7.3.exe and put my php project in htdocs folder. this is working on
The install goal copies the artifact to the target directory and to the local
What install tool can I use to create Virtual Directory on IIS? OpenSource, free
I install Joomla 2.5.4 plugin System - Twitter Roll and set basic configuration which
I install ruby via rbenv-installer . When I use irb console, I can use
gem install mygem ERROR: Error installing mygem: mygem requires mygem-adapter (>= 0, runtime) I
We install Matlab Runtime on a machine, then we restart a .net windows service
AssemblyInstaller.Install expects a System.Collections.IDictionary. Am I right to be 'allergic' to using non-generic collections

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.