Re: X3: declare/define/instantiate linker error

Mikael Asplund <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
Hi Michael.

The Meyer singleton is thread safe in C++11 and on, by definition in the standard:

Singleton& instance() {
   static Singleton instance;
   return instance;
}

  /Mikael

-----Original Message-----
From: Michael Powell [mailto:[email protected]] 
Sent: Friday, December 8, 2017 16:56
To: Spirit General Mailing List <[email protected]>
Subject: Re: [Spirit-general] X3: declare/define/instantiate linker error

Re: function-local parsers, sounds interesting. You might even declare them "static" within the function in order to avoid multiple warm ups.
Although with that you may also need to consider concurrency issues, I'm not positive; haven't fully vetted that notion myself.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.