single_instance_2.cpp 515 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2018 Peter Dimov.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. #include <boost/config.hpp>
  4. #if defined(SINGLE_INSTANCE_DYN_LINK)
  5. # define EXPORT BOOST_SYMBOL_EXPORT
  6. #else
  7. # define EXPORT
  8. #endif
  9. #include <boost/system/error_code.hpp>
  10. using namespace boost::system;
  11. namespace lib2
  12. {
  13. EXPORT error_code get_system_code()
  14. {
  15. return error_code( 0, system_category() );
  16. }
  17. EXPORT error_code get_generic_code()
  18. {
  19. return error_code( 0, generic_category() );
  20. }
  21. } // namespace lib2