Skip to content

Commit 515ee24

Browse files
committed
Mark functions utilizing operator overloading as deprected.
1 parent 43a4d7e commit 515ee24

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/threading/Shared.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,10 @@ class Shared
4242

4343
T pop();
4444
void push(T const & val);
45-
46-
operator T();
47-
void operator = (T const & val);
4845
inline T peek() const { return _val; }
4946

47+
operator T() [[deprecated("Use 'pop()' instead.")]];
48+
void operator = (T const & val) [[deprecated("Use 'push()' instead.")]];
5049

5150
private:
5251

src/threading/Sink.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ class SinkBase
4141
virtual T pop() = 0;
4242
virtual void inject(T const & value) = 0;
4343

44-
inline operator T() { return pop(); }
44+
inline operator T() [[deprecated("Use 'pop()' instead.")]]
45+
{
46+
return pop();
47+
}
4548
};
4649

4750
template<typename T>

src/threading/Source.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ class Source
4444

4545
void connectTo(SinkBase<T> & sink);
4646
void push(T const & val);
47-
void operator = (T const & val);
47+
48+
void operator = (T const & val) [[deprecated("Use 'push()' instead.")]];
4849

4950
private:
5051
std::list<SinkBase<T> *> _sink_list;

0 commit comments

Comments
 (0)