Ignore:
Timestamp:
Jan 20, 2017, 3:19:49 AM (6 years ago)
Author:
Peter
Message:

fixes #877

Generalize YAT_CXX_RVALUE into YAT_CXX_TRY_CXX11 and use that to
implement new macro YAT_CXX_ATOMIC. Use this macro in configure.ac and
use std::atomic<> conditoionally in RNG singleton.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/random/random.cc

    r3579 r3591  
    3030
    3131#include <cassert>
     32#include <cstddef>
    3233#include <cstring>
    3334#include <fstream>
     
    3839namespace random {
    3940
     41#ifdef YAT_HAVE_ATOMIC
     42  std::atomic<RNG*> RNG::instance_ { nullptr };
     43#else
    4044  RNG* RNG::instance_=NULL;
     45#endif
    4146  boost::mutex RNG::init_mutex_;
    4247
Note: See TracChangeset for help on using the changeset viewer.