synop.pass.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is dual licensed under the MIT and the University of Illinois Open
  6. // Source Licenses. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. // UNSUPPORTED: c++98, c++03
  10. // <experimental/filesystem>
  11. // class path
  12. // typedef ... value_type;
  13. // typedef basic_string<value_type> string_type;
  14. // static constexpr value_type preferred_separator = ...;
  15. #include "filesystem_include.hpp"
  16. #include <type_traits>
  17. #include <cassert>
  18. #include "test_macros.h"
  19. int main() {
  20. using namespace fs;
  21. ASSERT_SAME_TYPE(path::value_type, char);
  22. ASSERT_SAME_TYPE(path::string_type, std::basic_string<path::value_type>);
  23. {
  24. ASSERT_SAME_TYPE(const path::value_type, decltype(path::preferred_separator));
  25. static_assert(path::preferred_separator == '/', "");
  26. // Make preferred_separator ODR used by taking its address.
  27. const char* dummy = &path::preferred_separator;
  28. ((void)dummy);
  29. }
  30. }