boost-uuid Questions

2

Consider this function compiling with g++ -std=c++11 (GCC 4.7.2): boost::uuids::uuid getID() { static boost::uuids::random_generator generator; return generator(); } Is it safe to call getID f...
Wisdom asked 19/9, 2013 at 8:59

3

Solved

I want to check if a given string is a valid UUID using boost. This is what I have come up with by looking at the documentation on the boost website: void validate_uuid(const std::string& va...
Weirick asked 23/2, 2015 at 17:3

2

Solved

I want to generate just random UUID's, as it is just important for instances in my program to have unique identifiers. I looked into Boost UUID, but I can't manage to generate the UUID because I do...
Acuity asked 14/7, 2010 at 15:39

2

Solved

I have this code which is based on several posts in SO: boost::uuids::uuid uuid = boost::uuids::random_generator()(); auto uuidString= boost::lexical_cast<std::string>(uuid); but when I am...
Microfilm asked 14/4, 2015 at 15:12

1

Solved

I've just started using boost in c++ and I just wanted to ask a couple of questions relating to uuids. I am loading in a file which requires I know the uuids so I can link some objects together. ...
Scleroprotein asked 26/2, 2014 at 1:23

1

Solved

I'm using clang (CXX='clang++ -std=c++11 -stdlib=libc++') on Mac OS X, with boost 1.53.0. I want to use uuid as keys in unordered_map, but getting the following errors: /usr/bin/../lib/c++/v1/typ...
Ge asked 9/5, 2013 at 21:1

3

Solved

I'm using boost uuid to generate session ids. std::string SessionGenerator::generate() { boost::uuids::uuid id = m_rgen(); m_ss.clear(); m_ss.str(""); m_ss << id; return m_ss.str(); } ...
Glycolysis asked 8/6, 2012 at 15:33

1

Solved

I have a class with members: std::string mName; boost::uuids::uuid mId; In the constructor I wrote: mName = boost::lexical_cast<std::string>(mId); Valgrind writes: ==30714== Use of uni...
Bisulfate asked 3/4, 2012 at 20:30

1

Solved

When I generate the random number with single thread, no duplicate in 4M uuids generated but if I generate with two threads each 1M, I see roughly 16-20 duplicates. What could be the reason? class...
Circumjacent asked 1/6, 2011 at 16:47
1

© 2022 - 2024 — McMap. All rights reserved.