aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-05-31 11:34:53 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-05-31 11:34:53 +0100
commitaeedf0770557f01e46b95c220496e1b6d8b96149 (patch)
tree371dab6b8c5b2d0ce445476143bb14ac12e4d594 /gcc/cp/lambda.c
parentdecc53df4e4e50f1f202e1cb01acbceb8320f841 (diff)
downloadgcc-aeedf0770557f01e46b95c220496e1b6d8b96149.zip
gcc-aeedf0770557f01e46b95c220496e1b6d8b96149.tar.gz
gcc-aeedf0770557f01e46b95c220496e1b6d8b96149.tar.bz2
Fix random_device to work with COW strings again
Instead of duplicating the initialization functions that take string, add a new member taking a raw pointer that can be used to convert the constructor token from the old string to the new. Also fix "mt19337" typos in a testcase. * include/bits/random.h (random_device::_M_init(const char*, size_t)): Add new private member function. * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&)) (random_device::_M_init_pretr1(const string&)): Call new private member with string data. * src/c++11/random.cc (random_device::_M_init(const char*, size_t)): Define. * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New test using COW strings. * testsuite/26_numerics/random/random_device/cons/default.cc: Generate a value from the device. * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise. Fix typo in token string. From-SVN: r271805
Diffstat (limited to 'gcc/cp/lambda.c')
0 files changed, 0 insertions, 0 deletions