Commit Graph

2 Commits

Author SHA1 Message Date
Wyatt Hepler
023f35bab5 pw_polyfill, pw_minimal_cpp_stdlib: Fix namespace
- Clang / libc++ require standard library names to be defined in a
  special namespace. If they are simply declared in namespace std,
  strange errors can occur. This caused problems with std::span. Update
  pw_polyfill to add a macro that provides the std namespace
  declaration.
- Update pw_polyfill and pw_minimal_cpp_stdlib to use the new std
  namespace macro.
- Fully isolate the pw_minimal_cpp_stdlib library tests from the rest of
  Pigweed, since Pigweed builds with the standard library. This prevents
  isolates potentially conflicting standard library defintions.

Change-Id: I1a095e8ac879757ffba6796239e70785cc328cd7
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/13240
Reviewed-by: Rob Mohr <mohrr@google.com>
Reviewed-by: David Rogers <davidrogers@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
2020-07-01 19:21:52 +00:00
Wyatt Hepler
0412a7d8e5 pw_minimal_cpp_stdlib: Extremely limited C++ lib
pw_minimal_cpp_stdlib is an extremely limited, non-standard
implementation of the C++ Standard Library. It requires C++17 and a C
standard library.

Change-Id: I2d0b8d6cf49730e2c746eddf2c4a23308af1eb6a
2020-01-29 16:05:18 -08:00