reviewstash

by the stash, for the stash

Information

What's the future of RVS? Please check this post and vote!
PNY GeForce GTX 670 Unboxing
 
 
SilenX EFX-10-12 Effizio 100mm Silent Case Fan
 
 
OCZ Technology Revo Drive 3 Series 240GB PCIe
 
 
Rollback / Restore T-Mobile HTC Amaze to Stock Rom
 
 
Orient CFT Rally Semi-Skeleton Watch
 
 
HTC Amaze Camera Problem
 
 
Digital Concepts TR9 / Vivitar VIV-VPT-1250 Tripod
 
 
Computer Won't Boot with All Ram Slots Filled
 
 
HTC Amaze - TPU Case & Steinheil Screen Protector
 
 
HTC Sensation vs HTC Amaze - First Impressions
 
 
Windows XP Accessing Windows 7 Share Access Denied
 
 
Affiliate News
 
 
Accessing an STL Priority Queue's Container
 

Code:

template <class T, class S, class C>
    S& Container(std::priority_queue<T, S, C>& q) {
        struct HackedQueue : private std::priority_queue<T, S, C> {
            static S& Container(std::priority_queue<T, S, C>& q) {
                return q.*&HackedQueue::c;
            }
        };
    return HackedQueue::Container(q);
}

int main()
{
    std::priority_queue<SomeClass> pq;
    std::vector<SomeClass> &tasks = Container(pq);
    return 0;
}
 
Affiliate News
 
 
Affiliate News
 
 

Board footer

Optimized for 1280x1024 @ 32 bit
Fueled by FluxBB
Top 20 Posts
Who's Online
Index Map
About Us