Skip to content

Commit

Permalink
Merge pull request #16 from freebsd/revert-15-cxx11
Browse files Browse the repository at this point in the history
Revert "Remove support below C++11"
  • Loading branch information
ngie-eign authored Mar 12, 2024
2 parents d42d603 + 7f0bcbb commit 4b39412
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions debug.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
#define LUTOK_DEBUG_HPP

#include <string>
#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
#include <memory>
#else
#include <tr1/memory>
#endif

namespace lutok {

Expand All @@ -55,7 +59,11 @@ class debug {
struct impl;

/// Pointer to the shared internal implementation.
#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
std::shared_ptr< impl > _pimpl;
#else
std::tr1::shared_ptr< impl > _pimpl;
#endif

public:
debug(void);
Expand Down
2 changes: 0 additions & 2 deletions m4/compiler-features.m4
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ AC_DEFUN([KYUA_REQUIRE_CXX], [
if test "${atf_cv_prog_cxx_works}" = no; then
AC_MSG_ERROR([C++ compiler cannot create executables])
fi
AX_CXX_COMPILE_STDCXX_11([], [])
])

dnl
Expand Down
8 changes: 8 additions & 0 deletions state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@

#include <string>

#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
#include <memory>
#else
#include <tr1/memory>
#endif

namespace lutok {

Expand Down Expand Up @@ -73,7 +77,11 @@ class state {
struct impl;

/// Pointer to the shared internal implementation.
#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
std::shared_ptr< impl > _pimpl;
#else
std::tr1::shared_ptr< impl > _pimpl;
#endif

void* new_userdata_voidp(const size_t);
void* to_userdata_voidp(const int);
Expand Down

0 comments on commit 4b39412

Please sign in to comment.