Skip to content

Commit af15a1f

Browse files
jonsimantova-maurice
authored andcommitted
Remove copy constructor/operator from User class.
PiperOrigin-RevId: 246578034
1 parent 83f297e commit af15a1f

File tree

1 file changed

+8
-1
lines changed
  • auth/src/include/firebase/auth

1 file changed

+8
-1
lines changed

auth/src/include/firebase/auth/user.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,18 +437,25 @@ class User : public UserInfoInterface {
437437
virtual std::string phone_number() const;
438438

439439
private:
440+
/// @cond FIREBASE_APP_INTERNAL
440441
friend struct AuthData;
441442
// Only exists in AuthData. Access via @ref Auth::CurrentUser().
442443
explicit User(AuthData* auth_data) : auth_data_(auth_data) {}
443444

445+
// Disable copy constructor.
446+
User(const User&) = delete;
447+
// Disable copy operator.
448+
User& operator=(const User&) = delete;
449+
/// @endcond
450+
444451
#if defined(INTERNAL_EXPERIMENTAL)
445452
// Doxygen should not make docs for this function.
446453
/// @cond FIREBASE_APP_INTERNAL
447454
friend class IdTokenRefreshThread;
448455
friend class IdTokenRefreshListener;
449456
Future<std::string> GetTokenInternal(const bool force_refresh,
450457
const int future_identifier);
451-
/// @endcon
458+
/// @endcond
452459
#endif // defined(INTERNAL_EXPERIMENTAL)
453460

454461
// Use the pimpl mechanism to hide data details in the cpp files.

0 commit comments

Comments
 (0)