Skip to content

Commit 8cb47c1

Browse files
committed
Remove constexpr
1 parent 0a0dcb0 commit 8cb47c1

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ Synopsis
120120
|   |– |– |   | const_reference |  |
121121
| Lifetime types |✓|– |   | cloner_type |[2]: copier_type |
122122
|   |✓|✓|   | deleter_type |  |
123-
| Construction |✓|✓|   | constexpr value_ptr() noexcept |... |
124-
|   |– |✓| C++11 | constexpr value_ptr( std::nullptr_t ) noexcept|... |
123+
| Construction |✓|✓|   | value_ptr() noexcept |... |
124+
|   |– |✓| C++11 | value_ptr( std::nullptr_t ) noexcept|... |
125125
|   |✓|– |   | value_ptr( pointer p ) noexcept |... |
126126
|   |✓|✓|   | value_ptr( value_ptr const & other ) |... |
127127
|   |✓|✓| C++11 | value_ptr( value_ptr && other ) noexcept |... |
@@ -151,7 +151,7 @@ Synopsis
151151
|   |✓|✓|   | reference operator*() const |... |
152152
|   |✓|✓|   | pointer operator->() const noexcept |... |
153153
|   |✓|✓| C++11 | explicit operator bool() const noexcept |... |
154-
| &nbsp; |&ndash; |&ndash; |<C++11 | constexpr operator safe_bool() const noexcept |... |
154+
| &nbsp; |&ndash; |&ndash; |<C++11 | operator safe_bool() const noexcept |... |
155155
| &nbsp; |&ndash; |&ndash; | &nbsp; | bool has_value() const nsvp_noexcept |... |
156156
| &nbsp; |&ndash; |&ndash; | &nbsp; | element_type const & value() const |... |
157157
| &nbsp; |&ndash; |&ndash; | &nbsp; | element_type & value() |... |
@@ -249,8 +249,8 @@ Other value-ptr implementations
249249
Notes and references
250250
--------------------
251251
252-
<a id="ref1"></a>[1] Gaetano Checinski. [value_ptr — The Missing C++ Smart-pointer](https://hackernoon.com/value-ptr-the-missing-c-smart-pointer-1f515664153e) ([GitHub](https://github.com/LoopPerfect/valuable)). May 2017.
253-
<a id="ref2"></a>[2] Andrey Upadyshev. [PIMPL, Rule of Zero and Scott Meyers](http://oliora.github.io/2015/12/29/pimpl-and-rule-of-zero.html) ([GitHub](https://github.com/oliora/samples/blob/master/spimpl.h)). December 29, 2015.
252+
<a id="ref1"></a>[1] Gaetano Checinski. [value_ptr — The Missing C++ Smart-pointer](https://hackernoon.com/value-ptr-the-missing-c-smart-pointer-1f515664153e) ([GitHub](https://github.com/LoopPerfect/valuable)). May 2017.
253+
<a id="ref2"></a>[2] Andrey Upadyshev. [PIMPL, Rule of Zero and Scott Meyers](http://oliora.github.io/2015/12/29/pimpl-and-rule-of-zero.html) ([GitHub](https://github.com/oliora/samples/blob/master/spimpl.h)). December 29, 2015.
254254
255255
Appendix
256256
--------

include/nonstd/value_ptr.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ using std::default_delete;
253253
template< class T >
254254
struct default_delete
255255
{
256-
nsvp_constexpr default_delete() nsvp_noexcept {};
256+
default_delete() nsvp_noexcept {};
257257

258258
void operator()( T * ptr ) const nsvp_noexcept
259259
{
@@ -523,12 +523,12 @@ class value_ptr
523523
~value_ptr() = default;
524524
#endif
525525

526-
nsvp_constexpr value_ptr() nsvp_noexcept
526+
value_ptr() nsvp_noexcept
527527
: ptr( cloner_type(), deleter_type() )
528528
{}
529529

530530
#if nsvp_HAVE_NULLPTR
531-
nsvp_constexpr value_ptr( std::nullptr_t ) nsvp_noexcept
531+
value_ptr( std::nullptr_t ) nsvp_noexcept
532532
: ptr( cloner_type(), deleter_type() )
533533
{}
534534
#endif
@@ -715,7 +715,7 @@ class value_ptr
715715
void this_type_does_not_support_comparisons() const {}
716716

717717
public:
718-
nsvp_constexpr operator safe_bool() const nsvp_noexcept
718+
operator safe_bool() const nsvp_noexcept
719719
{
720720
return has_value() ? &value_ptr::this_type_does_not_support_comparisons : 0;
721721
}
@@ -745,15 +745,15 @@ class value_ptr
745745
#if nsvp_CPP11_OR_GREATER
746746

747747
template< class U >
748-
nsvp_constexpr element_type value_or( U && v ) const
748+
element_type value_or( U && v ) const
749749
{
750750
return has_value() ? value() : static_cast<element_type>(std::forward<U>( v ) );
751751
}
752752

753753
#else
754754

755755
template< class U >
756-
nsvp_constexpr element_type value_or( U const & v ) const
756+
element_type value_or( U const & v ) const
757757
{
758758
return has_value() ? value() : static_cast<element_type>( v );
759759
}

0 commit comments

Comments
 (0)