Skip to content

Commit a1c175e

Browse files
authored
Merge pull request #4 from cschreib/enable_observer_from_this_optim
Bug fixes for enable_observer_from_this
2 parents b697b94 + 726c5a7 commit a1c175e

File tree

6 files changed

+421
-164
lines changed

6 files changed

+421
-164
lines changed

.github/workflows/cmake.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
platform:
16-
- { name: Ubuntu GCC, os: ubuntu-latest, compiler: g++, arch: "64", cmakepp: "", flags: "-DCMAKE_CXX_FLAGS=--coverage"}
17-
- { name: Ubuntu Clang, os: ubuntu-latest, compiler: clang++, arch: "64", cmakepp: "", flags: ""}
16+
- { name: Ubuntu GCC, os: ubuntu-latest, compiler: g++, arch: "64", cmakepp: "", flags: "-DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_FLAGS=--coverage"}
17+
- { name: Ubuntu Clang, os: ubuntu-latest, compiler: clang++, arch: "64", cmakepp: "", flags: "-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=-stdlib=libc++"}
1818
- { name: Windows 32, os: windows-latest, compiler: vs2019, arch: "32", cmakepp: "", flags: "-A Win32"}
1919
- { name: Windows 64, os: windows-latest, compiler: vs2019, arch: "64", cmakepp: "", flags: "-A x64"}
2020
- { name: MacOS, os: macos-latest, compiler: clang++, arch: "64", cmakepp: "", flags: ""}
@@ -32,9 +32,9 @@ jobs:
3232
with:
3333
submodules: 'recursive'
3434

35-
- name: Setup Linux compiler
36-
if: runner.os == 'Linux'
37-
run: export CXX=${{matrix.platform.compiler}}
35+
- name: Setup Clang
36+
if: matrix.platform.compiler == 'clang++' && matrix.platform.os == 'ubuntu-latest'
37+
run: sudo apt install clang libc++-dev libc++abi-dev
3838

3939
- name: Setup Emscripten cache
4040
if: matrix.platform.compiler == 'em++'

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ int main() {
8383
}
8484
```
8585

86-
As with `std::shared_ptr`/`std::weak_ptr`, if you need to obtain an observer pointer to an object when you only have `this` (i.e., from a member function), you can inherit from `oup::enable_observer_from_this<T>` to gain access to the `observer_from_this()` member function. This function will return a valid observer pointer as long as the object is owned by a unique or sealed pointer, and will return `nullptr` in all other cases.
86+
As with `std::shared_ptr`/`std::weak_ptr`, if you need to obtain an observer pointer to an object when you only have `this` (i.e., from a member function), you can inherit from `oup::enable_observer_from_this<T>` to gain access to the `observer_from_this()` member function. This function will return a valid observer pointer as long as the object is owned by a unique or sealed pointer, and will return `nullptr` in all other cases. Contrary to `std::enable_shared_from_this<T>`, this feature naturally supports multiple inheritance.
8787

8888

8989
## Limitations

doc/dox.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
3232
# title of most generated pages and in a few other places.
3333
# The default value is: My Project.
3434

35-
PROJECT_NAME = observable_unique_ptr
35+
PROJECT_NAME = "Observable unique-ownership smart pointers"
3636

3737
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
3838
# could be handy for archiving the generated documentation or if some version
@@ -2235,7 +2235,7 @@ DIA_PATH =
22352235
# and usage relations if the target is undocumented or is not a class.
22362236
# The default value is: YES.
22372237

2238-
HIDE_UNDOC_RELATIONS = YES
2238+
HIDE_UNDOC_RELATIONS = NO
22392239

22402240
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
22412241
# available from the path. This tool is part of Graphviz (see:

0 commit comments

Comments
 (0)