--- /dev/null
+#ifndef MSP_CORE_ATTRIBUTES_H_
+#define MSP_CORE_ATTRIBUTES_H_
+
+#if __cplusplus >= 201402L
+#define DEPRECATED [[deprecated]]
+#elif defined(__GNUC__)
+#define DEPRECATED __attribute__((deprecated))
+#elif defined(__MSC_VER)
+#define DEPRECATED __declspec(deprecated)
+#endif
+
+#endif
#include <string>
#include <vector>
#include <msp/strings/lexicalcast.h>
+#include "attributes.h"
#include "noncopyable.h"
namespace Msp {
~GetOpt();
/** Returns any non-option arguments encountered during processing.
- Deprecated. */
- const std::vector<std::string> &get_args() const { return args_raw; }
+ Deprecated; use add_argument instead. */
+ DEPRECATED const std::vector<std::string> &get_args() const { return args_raw; }
/** Adds an option with both short and long forms. Processing depends on
the type of the destination variable and whether an argument is taken or
#include <list>
#include <stdexcept>
#include <string>
+#include <msp/core/attributes.h>
#include "path.h"
namespace Msp {
Path get_home_dir();
/// Deprecated. Use the argument-less version instead.
-Path get_user_data_dir(const std::string &appname);
+DEPRECATED Path get_user_data_dir(const std::string &appname);
/// Returns a directory suitable for storing user-specific data.
Path get_user_data_dir();
/// Deprecated. Use the argument-less version instead.
-Path get_sys_conf_dir(const std::string &argv0);
+DEPRECATED Path get_sys_conf_dir(const std::string &argv0);
/// Returns a directory containing system-wide configuration.
Path get_sys_conf_dir();
/// Deprecated. Use the argument-less version instead.
-Path get_sys_data_dir(const std::string &argv0, const std::string &appname);
+DEPRECATED Path get_sys_data_dir(const std::string &argv0, const std::string &appname);
/// Returns a directory containing immutable system-wide data.
Path get_sys_data_dir();
/// Deprecated. Use the argument-less version instead.
-Path get_sys_lib_dir(const std::string &argv0, const std::string &appname);
+DEPRECATED Path get_sys_lib_dir(const std::string &argv0, const std::string &appname);
/// Returns a directory containing system-wide architecture-specific files.
Path get_sys_lib_dir();
#include <vector>
#include <sigc++/sigc++.h>
+#include <msp/core/attributes.h>
#include <msp/core/mutex.h>
#include <msp/core/noncopyable.h>
#include <msp/core/semaphore.h>
void cancel(Slot &);
/** Deprecated. Use one of the other overloads. */
- void tick(bool block);
+ DEPRECATED void tick(bool block);
/** Waits until a timer expires, then executes it. If no timers have been
set, blocks until one is added from another thread. */
#include "timedelta.h"
// This header is deprecated
+#error "Time units are in timedelta.h"
#endif