Skip to content

Releases: r-lib/cpp11

cpp11 0.4.7

04 Dec 13:46
Compare
Choose a tag to compare
  • Internal changes requested by CRAN to fix invalid format string tokens
    (@paleolimbot, #345).

cpp11 0.4.6

10 Aug 13:56
d24c6c7
Compare
Choose a tag to compare
  • R >=3.5.0 is now required to use cpp11. This is in line with (and even goes
    beyond) the tidyverse standard of supporting the previous 5 minor releases of
    R. It also ensures that R_UnwindProtect() is available to avoid C++ memory
    leaks (#332).

  • cpp11::preserved.release_all() has been removed. This was intended to
    support expert developers on R <3.5.0 when cpp11 used a global protection
    list. Since cpp11 no longer uses a global protection list and requires R

    =3.5.0, it is no longer needed. As far as we can tell, no package was
    actively using this (#332).

  • cpp11 now creates one protection list per compilation unit, rather than one
    global protection list shared across compilation units and across packages.
    This greatly reduces the complexity of managing the protection list state and
    should make it easier to make changes to the protection list structure in the
    future without breaking packages compiled with older versions of cpp11 (#330).

  • Nested calls to cpp11::unwind_protect() are no longer supported or
    encouraged. Previously, this was something that could be done for performance
    improvements, but ultimately this feature has proven to cause more problems
    than it is worth and is very hard to use safely. For more information, see the
    new vignette("FAQ") section titled "Should I call cpp11::unwind_protect()
    manually?" (#327).

  • The features and bug fixes from cpp11 0.4.4 have been added back in.

cpp11 0.4.5

25 Jul 15:08
Compare
Choose a tag to compare
  • On 2023-07-20, cpp11 was temporarily rolled back to 0.4.3 manually by CRAN due
    to a bug in 0.4.4 which we could not immediately fix due to the cpp11
    maintainer being on vacation.

cpp11 0.4.4

05 Jul 18:25
Compare
Choose a tag to compare
  • Davis Vaughan is now the maintainer.

  • as_doubles() and as_integers() now propagate missing values correctly
    (#265, #319).

  • Fixed a performance issue related to nested unwind_protect() calls (#298).

  • Minor performance improvements to the cpp11 protect code. (@kevinushey)

  • Silenced an unknown attribute warning specific to the Intel compiler
    (r-lib/systemfonts#98).

  • cpp_register() gains an argument extension= governing the file extension of
    the src/cpp11 file. By default it's .cpp, but .cc is now supported
    as well (#292, @MichaelChirico)

cpp11 0.4.3

12 Oct 09:10
Compare
Choose a tag to compare
  • Modernized the GitHub Actions workflows and updated some internal tests to
    better align with changes in those workflows and the latest version of R
    (#279).

  • cpp_source() errors on non-existent file (#261).

  • cpp_register() is quiet by default when R is non interactive (#289).

  • updated test to adapt to changes in R 4.2.1 (#290).

cpp11 0.4.2

30 Nov 14:24
Compare
Choose a tag to compare
  • Romain François is now the maintainer.

cpp11 0.4.1

08 Nov 19:58
Compare
Choose a tag to compare
  • Fix crash related to unwind protect optimization (#244)

cpp11 0.4.0

22 Oct 13:47
Compare
Choose a tag to compare

New Features

  • New opt-in message formatting with the {fmt} C++ library for cpp11::messages() cpp11::stop() and cpp11::warning().
    Set the CPP11_USE_FMT macro to use this feature in your package. (@sbearrows, #169, #208)
  • New as_double() and as_integer() methods to coerce integers to doubles and doubles to integers to doubles (@sbearrows, #46)
  • cpp11::matrix iterators can now be used either row-wise or column-wise (the default) depending on the user's choice (@alyst, #229)

Improvements and fixes

  • Read-only matrix accessors are now marked const (#234)
  • writable::r_vector default constructors now return a 0 length vector when converted to SEXP (#166)
  • Read-only r_vector constructors now disallow implicit construction with named arguments (#237)
  • Read-only r_vector.attr() methods now return const objects, so it is a compile time error to try to assign to them (#237)
  • Fixed + and += operators of r_vector::[const_]iterator to conform the iterators concept:
    += updates the iterator, and + returns the updated copy, while keeping the original unchanged (@alyst, #231)
  • Remove undefined behavior when constructing global cpp11::sexps (#224)
  • Removed redundant .Call calls in cpp11.cpp file (@sbearrows, #170)
  • Error messages now output original file name rather than the temporary file name (@sbearrows, #194)
  • cpp_register() now includes attribute_visible in the init function, so packages compiled with C_VISIBILITY will find the init function.
  • Fixed bug when running cpp_source() on the same file more than once (@sbearrows, #202)
  • Allow cpp11 decorators of the form cpp11::linking_to (@sbearrows, #193)
  • Removed internal instances of cpp11::stop() and replaced with C++ exceptions (@sbearrows, #203)
  • Names of named lists are now resized along with the list elements (@sbearrows, #206)

cpp11 0.3.1

28 Jun 20:11
Compare
Choose a tag to compare
  • Fix stringop-truncation warning from generated wrapping code.

cpp11 0.3.0

28 Jun 20:12
Compare
Choose a tag to compare

New functions and features

  • New x.empty() method to check if a vector is empty (@sbearrows, #182)
  • New x.named() method to check if a vector is named (@sbearrows, #186)
  • New na() free function to return the NA sentinels for R objects (@sbearrows, #179)

Major fixes

  • Memory no longer inadvertently leaks when move constructing vectors (#173)

minor improvements and fixes

  • Incorrectly formatted cpp11 decorators now output a more informative error message (@sbearrows, #127)
  • Generated registration code now uses C collation to avoid spurious changes from tools::package_native_routine_registration_skeleton() (@sbearrows, #171)
  • Makevars files which include filenames now handle spaces in paths properly (@klmr, #160)