x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Compiler thinks there is No binary conversion for uint32, making << operator for FConstraintInstance

 error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'uint32' (or there is no acceptable conversion)

Edit

I see in ArchiveBase, 196

 /**
      * Serializes an unsigned 32-bit integer value from or into an archive.
      *
      * @param Ar - The archive to serialize from or to.
      * @param Value - The value to serialize.
      */
     FORCEINLINE friend FArchive& operator<<(FArchive& Ar, uint32& Value)
     {
         Ar.ByteOrderSerialize(&Value, sizeof(Value));
 
         return Ar;
     }

but compiler is not recognizing this for some reason!

it lists the correct conversion in the long list of the << operator possibilities, but is still saying it cant find the uint32 conversion when I am trying to do the following:

 //Constraint Instance
 FORCEINLINE FArchive &operator <<(FArchive &Ar, FConstraintInstance& TheStruct )
 {
     //Collision
     Ar << TheStruct.bDisableCollision;
     
     //Projection
     Ar << TheStruct.bEnableProjection;
     Ar << TheStruct.ProjectionLinearTolerance;
     Ar << TheStruct.ProjectionAngularTolerance;
     
     //Linear Limit
     Ar << TheStruct.LinearXMotion;
     Ar << TheStruct.LinearYMotion;
     Ar << TheStruct.LinearZMotion;
     Ar << TheStruct.LinearLimitSize;
     Ar << TheStruct.bLinearLimitSoft;
     Ar << TheStruct.LinearLimitStiffness;
     Ar << TheStruct.LinearLimitDamping;
     Ar << TheStruct.bLinearBreakable;
     Ar << TheStruct.LinearBreakThreshold;
     Ar << TheStruct.LinearYMotion;
     
     //Angular Limit
     Ar << TheStruct.AngularSwing1Motion;
     Ar << TheStruct.AngularSwing2Motion;
     Ar << TheStruct.AngularTwistMotion;
     Ar << TheStruct.bSwingLimitSoft;
     Ar << TheStruct.bTwistLimitSoft;
     Ar << TheStruct.Swing1LimitAngle;
     Ar << TheStruct.Swing2LimitAngle;
     Ar << TheStruct.TwistLimitAngle;
     Ar << TheStruct.SwingLimitStiffness;
     Ar << TheStruct.TwistLimitStiffness;
     Ar << TheStruct.SwingLimitDamping;
     Ar << TheStruct.TwistLimitDamping;
     Ar << TheStruct.bAngularBreakable;
     Ar << TheStruct.AngularBreakThreshold;
     
     //Linear Drive
     Ar << TheStruct.bLinearXPositionDrive;
     Ar << TheStruct.bLinearYPositionDrive
     Ar << TheStruct.bLinearZPositionDrive;
     Ar << TheStruct.bLinearPositionDrive;
     Ar << TheStruct.bLinearVelocityDrive;
     Ar << TheStruct.LinearPositionTarget;
     Ar << TheStruct.LinearVelocityTarget;
     Ar << TheStruct.LinearDriveSpring;
     Ar << TheStruct.LinearDriveDamping;
     Ar << TheStruct.LinearDriveForceLimit;
     
     //Angular Drive
     Ar << TheStruct.bAngularOrientationDrive;
     Ar << TheStruct.bAngularVelocityDrive;
     Ar << TheStruct.AngularOrientationTarget;
     Ar << TheStruct.AngularVelocityTarget;
     Ar << TheStruct.AngularDriveSpring;
     Ar << TheStruct.AngularDriveDamping;
     Ar << TheStruct.AngularDriveForceLimit;
     
 }

Rama

Product Version: Not Selected
Tags:
more ▼

asked Apr 04 '14 at 08:59 PM in C++ Programming

avatar image

Rama
10.6k 446 346 1088

avatar image sinoth Jul 06 '15 at 09:54 PM

I know this is super old, but I'm running into the same problem now. Did you ever resolve this issue?

avatar image sinoth Jul 06 '15 at 10:11 PM

Scratch that, figured it out. Two problems:

  • I had my uint32 on the left side of the <<. The archive must ALWAYS be on the left.

  • I was using a pointer to the archive, so I needed to dereference it to use the << operator.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi,

I'm having the same problem.

 void USpiderMovementComponent::SaveLoad(FArchive& Ar) {
     Ar << bAlwaysCheckFloor;
 ....

Did you solve this?

Rama, I'm basically following your tutorial.

Regards,

B

more ▼

answered Dec 06 '15 at 05:23 PM

avatar image

Bionic Ape
129 16 20 25

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question