Skip to content
This repository has been archived by the owner on Aug 25, 2018. It is now read-only.

Add NANODBC_DEPRECATED macro #279

Merged
merged 1 commit into from
Jul 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions nanodbc/nanodbc.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,19 @@ typedef unspecified - type null_type;
#define NANODBC_NOEXCEPT noexcept
#endif

#if __cplusplus >= 201402L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L)
// [[deprecated]] is only available in C++14
#define NANODBC_DEPRECATED [[deprecated]]
#else
#ifdef __GNUC__
#define NANODBC_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
#define NANODBC_DEPRECATED __declspec(deprecated)
#else
#define NANODBC_DEPRECATED
#endif
#endif

// clang-format off
// 8888888888 888 888 888 888 d8b
// 888 888 888 888 888 Y8P
Expand Down Expand Up @@ -614,8 +627,10 @@ class statement
/// \see async_execute(), async_execute_direct()
class result complete_execute(long batch_operations = 1);

/// left for backwards compatibility
class result async_complete(long batch_operations = 1);
/// \brief Completes a previously initiated asynchronous query execution, returning the result.
///
/// \deprecated Use complete_execute instead.
NANODBC_DEPRECATED class result async_complete(long batch_operations = 1);

/// undocumented - for internal use only (used from result_impl)
void enable_async(void* event_handle);
Expand Down